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
@@ -46,8 +46,8 @@ import (
var cfg Config
func main() {
// 自动加载 .env 文件(来自 backend/.env
if err := godotenv.Load("../.env"); err != nil {
// 自动加载 .env 文件(来自仓库根目录
if err := godotenv.Load("../../.env"); err != nil {
log.Println("ℹ 未找到 .env 文件,将使用环境变量或默认值")
}