# ───────────────────────────────────────────────────────────── # nginx.conf — Frontend container configuration # Serves Vite SPA and proxies /bridge to the bridge service # ───────────────────────────────────────────────────────────── server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; # Proxy /bridge requests to the bridge Express service location /bridge/ { proxy_pass http://bridge:3456/bridge/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Connection ""; # Timeouts for slow hermes CLI calls proxy_read_timeout 60s; proxy_send_timeout 60s; proxy_connect_timeout 10s; } # SPA fallback — serve index.html for client-side routes location / { try_files $uri $uri/ /index.html; } # Cache static assets aggressively (Vite hashes filenames) location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; } }