build: pass module proxy to docker builder
This commit is contained in:
@@ -230,6 +230,7 @@ grep -rn --include="*.go" "float64\|float32" internal/entity
|
||||
- `.dockerignore` 必须排除 `.env` 和 `.env.*`,防止 `Dockerfile` 的 `COPY . .` 把 secrets 送进 build context / builder layer。
|
||||
- app 容器内端口固定为 8080;宿主机暴露端口只通过 `APP_HOST_PORT` 调整。不要在 compose 中用 `${APP_PORT}` 同时控制容器内监听和宿主机映射。
|
||||
- app 必须等待 Postgres healthcheck 通过、migration init container 成功退出后再启动。
|
||||
- Docker build 阶段必须显式传入 `GOPROXY` / HTTP(S) proxy build args;`go mod download` 失败必须立刻失败,禁止 `go mod download || true`。
|
||||
|
||||
**为什么**:这个服务虽然不接 Binance 私钥,但 DB 密码和代理凭据仍可能出现在 `.env`。同时 app 启动前若表不存在,会导致 collector/API 失败;端口变量混用会让健康检查和端口映射分叉。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user