refactor: 统一 .env 配置 — 合并 backend/.env + .docker.env 到根目录

- Go 服务 godotenv.Load("../.env") → godotenv.Load("../../.env")
- ethend.sh/config.js 读取路径改为根目录 .env
- 删除 .docker.env.example 和 backend/.env.example,统一为 .env.example
- Docker compose 默认读取根 .env,无需 --env-file
- 同步更新全部文档

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 10:12:54 +08:00
parent 43d256e197
commit 46441335c0
12 changed files with 49 additions and 92 deletions
+2 -2
View File
@@ -95,9 +95,9 @@ check_deps() {
# ========== 加载 .env ==========
load_env() {
local env_file="$ROOT/backend/.env"
local env_file="$ROOT/.env"
if [ -f "$env_file" ]; then
echo -e "${GREEN}✓ 加载环境变量: backend/.env${NC}"
echo -e "${GREEN}✓ 加载环境变量: .env${NC}"
set -a
source "$env_file"
set +a