# nginx config for CRDC Arrests Demo — static SPA with proper caching. server { listen 80; server_name _; # Serve static files from the Vite build output root /usr/share/nginx/html; index index.html; # Civilytics design tokens: immutable cache headers (data doesn't change between releases) location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff2|ttf)$ { expires 1y; add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } # SPA fallback — all routes serve index.html (client-side routing) location / { try_files $uri $uri/ /index.html; } # Health check endpoint for container orchestration location /healthz { access_log off; return 200 "ok"; add_header Content-Type text/plain; } }