fix(deploy): defer nginx upstream DNS until api is reachable

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-08 17:49:57 +08:00
parent b4d3315db8
commit 5279a7f831
3 changed files with 17 additions and 5 deletions

View File

@@ -540,9 +540,13 @@ docker compose -f docker-compose.prod.yml --env-file .env.docker up -d
- 已改为 entrypoint 执行 `node dist/infrastructure/database/seed-cli.js`;拉代码后重建 api 镜像
- **临时绕过**(先让 API 起来):`.env.docker``SEED_DATABASE=false``up -d api`
---
### 14. player/admin 重启,`host not found in upstream "api"`
## 十、推荐日常开发顺序
- 原因nginx 启动时 API 容器尚未就绪,静态 `proxy_pass http://api:3000` 解析失败
- 已改为 Docker DNS + 变量延迟解析;重建 player/admin 镜像
- **临时处理**API 已 Up 时):`docker compose ... restart player`
---
```text
1. docker compose up -d