Files
EasyGoAdmin_GoFrame_EleVue/docker/.env.example
T
2026-10-20 14:55:25 +08:00

36 lines
1.5 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# Docker Compose 环境变量模板
# 用法:复制为同目录 .env(同目录被 .gitignore 与 .dockerignore 双重排除)
# copy .env.example .env
# ============================================================
# ===== 应用 =====
APP_PORT=8000
JWT_SECRET=please-change-this-jwt-secret
# ===== MySQL =====
# 数据库地址(容器网络内地址,非宿主机映射端口)
# 连 compose 自带 mysql 服务:保持默认服务名 mysql
# 连宿主机数据库:Mac/Windows Docker Desktop 用 host.docker.internal,
# Linux 用宿主机实际 IP 或 --add-host=host.docker.internal:host-gateway
# 注意:容器内 127.0.0.1 指向容器自身,连不上宿主机数据库
MYSQL_HOST=mysql
# 目标库监听端口(连接串内的端口;连外部库时填外部库端口,与下面的宿主映射端口无关)
MYSQL_HOST_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_DATABASE=easygoadmin.goframe.elevue
# 宿主机映射端口(仅 compose 自带 mysql 服务对外暴露时使用)
MYSQL_PORT=3306
# ===== Redis =====
# 同 MYSQL_HOST 规则;容器内 127.0.0.1 指向容器自身,连不上宿主机 Redis
REDIS_HOST=redis
# 连宿主机 Redis 时改为(Windows/Mac Docker Desktop):
# REDIS_HOST=host.docker.internal
# 目标 Redis 监听端口(连外部库时填外部端口)
REDIS_HOST_PORT=6379
# 宿主机映射端口(仅 compose 自带 redis 服务对外暴露时使用)
REDIS_PORT=6379
REDIS_PASSWORD=123456