# Static host for the built admin SPA. Client-side routing (react-router)
# means any unknown path must fall back to index.html rather than 404 —
# same reason apps/api serves its own SPA that way.
server {
    listen 80;
    server_name _;
    root /usr/share/nginx/html;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    # Long-cache the fingerprinted assets Vite emits; never cache the HTML
    # entry point so a new deploy is picked up immediately.
    location /assets/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }
}
