worker_processes auto; pid /tmp/nginx.pid; error_log /dev/stderr warn; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /dev/stdout; sendfile on; server_tokens off; # All runtime writes go to /tmp, allowing a read-only container filesystem. client_body_temp_path /tmp/client_temp; proxy_temp_path /tmp/proxy_temp; fastcgi_temp_path /tmp/fastcgi_temp; uwsgi_temp_path /tmp/uwsgi_temp; scgi_temp_path /tmp/scgi_temp; # Precompressed at build time; uncompressed clients receive the original. gzip_static on; gzip_vary on; server { listen 8080; listen [::]:8080; root /usr/share/nginx/html; index index.html; add_header X-Content-Type-Options nosniff always; location = /healthz { access_log off; default_type text/plain; return 200 "ok\n"; } location = /index.html { add_header Cache-Control no-cache always; add_header X-Content-Type-Options nosniff always; } # Trunk gives these files content hashes. Missing assets must be 404s, # never an HTML fallback or an error cached for a year. location ~ \.(wasm|js)$ { types { application/wasm wasm; text/javascript js; } add_header Cache-Control "public, max-age=31536000, immutable"; add_header X-Content-Type-Options nosniff always; try_files $uri =404; } location / { try_files $uri $uri/ =404; } } }