fix: 修复 Drone 配置和 nginx 多环境支持
All checks were successful
continuous-integration/drone/push Build is passing

- 分离测试/生产环境的前端镜像构建
- nginx 配置使用 BACKEND_HOST 变量区分环境
- 生产环境添加独立的 Docker network
- 生产环境使用独立的密钥配置 (xxx_prod)
- 修复前端空白问题:确保前后端在同一 network
This commit is contained in:
2026-01-24 17:15:12 +08:00
parent 6c6c48cf71
commit b6b5ac61af
3 changed files with 36 additions and 13 deletions

View File

@@ -14,9 +14,9 @@ server {
}
# API 代理到后端
# 使用 Docker 容器名称,通过 Docker DNS 解析
# 使用环境变量 BACKEND_HOST,通过 Docker DNS 解析
location /api/ {
set $backend platform-backend-test:8000;
set $backend ${BACKEND_HOST}:8000;
proxy_pass http://$backend/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;