This commit is contained in:
2026-09-11 20:02:07 +08:00
parent ba58f9e534
commit 9e59cc4462
6 changed files with 8 additions and 30 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
)
// init 数据库配置的环境变量覆盖(同一份 config.yml 线上线下通用,不用改文件切环境):
// Docker 部署由 docker-compose 注入 DB_HOST/DB_NAME 指向容器网络内的 postgres
// Docker 部署由 docker-compose 注入 DB_HOST/DB_PASS 指向容器网络内的 postgres
// 本地开发不注入,走 config.yml 默认值(127.0.0.1/animal_spot)。
// Set 是纯内存覆盖(不落盘),且必须发生在任何 g.DB() 调用(含 dao 包 init 建表)之前——
// common 包先于依赖它的 dao 包初始化,天然满足时序。