fix: 修复 Drone 配置和 nginx 多环境支持
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 分离测试/生产环境的前端镜像构建 - nginx 配置使用 BACKEND_HOST 变量区分环境 - 生产环境添加独立的 Docker network - 生产环境使用独立的密钥配置 (xxx_prod) - 修复前端空白问题:确保前后端在同一 network
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user