fix(docker): update nginx configuration and simplify docker script (#903)

This commit is contained in:
JeffJiang
2026-02-25 22:16:43 +08:00
committed by GitHub
parent d24a66ffd3
commit 3a7251c95e
3 changed files with 6 additions and 10 deletions

View File

@@ -66,7 +66,7 @@ services:
ports:
- "2026:2026"
volumes:
- ./nginx/${NGINX_CONF:-nginx.local.conf}:/etc/nginx/nginx.conf:ro
- ./nginx/${NGINX_CONF:-nginx.conf}:/etc/nginx/nginx.conf:ro
depends_on:
- frontend
- gateway

View File

@@ -30,10 +30,6 @@ http {
server frontend:3000;
}
upstream provisioner {
server provisioner:8002;
}
# ── Main server (path-based routing) ─────────────────────────────────
server {
listen 2026 default_server;
@@ -189,8 +185,11 @@ http {
}
# ── Provisioner API (sandbox management) ────────────────────────
# Use a variable so nginx resolves provisioner at request time (not startup).
# This allows nginx to start even when provisioner container is not running.
location /api/sandboxes {
proxy_pass http://provisioner;
set $provisioner_upstream provisioner:8002;
proxy_pass http://$provisioner_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;