# Serves the built SPA and proxies /api to the backend in the same container. # Rendered by the nginx image's envsubst step into /etc/nginx/conf.d/default.conf. server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; # The SPA handles the API itself; don't announce the server version. server_tokens off; # SPA fallback: unknown paths render the app, so client-side routes like # /rooms/daily-standup work on refresh and deep links. location / { try_files $uri $uri/ /index.html; } location = /index.html { add_header Cache-Control "no-store"; } # Proxy the API to the Go backend running alongside nginx. location /api/ { proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT}; 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; } }