# Static file server for the built SPA (inside the frontend image). # Routing / API proxying is done by the separate nginx service. server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/css application/javascript application/json image/svg+xml; gzip_min_length 1024; location = /nginx-health { access_log off; return 200 "ok\n"; } # Client-side routes: everything that is not a real file gets index.html. location / { try_files $uri /index.html; } # Hashed build assets can be cached hard. location /assets/ { expires 30d; add_header Cache-Control "public, immutable"; } }