Files
threshing-atlas/deploy/nginx.conf
T
kschianoandClaude Opus 5.5 b9d692a91c
CI / test (pull_request) Successful in 41s
Build the site image on Red Hat's hardened images
Node build on hi/nodejs:22-builder, the nginx config checked with `nginx -t` on
hi/nginx:latest-builder, served by the distroless hi/nginx runtime (UID 65532,
no shell). nginx keeps temp files in /tmp so the pod can run with a read-only
root filesystem; adds nosniff/referrer headers and hides the nginx version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 20:49:45 -05:00

37 lines
1.3 KiB
Nginx Configuration File

# The Atlas is plain static files. The data changes daily, so browsers revalidate rather than cache blindly.
# Replaces the image's conf.d/default.conf (it listens on 8080 and runs as UID 65532).
# Temp files under /tmp (an emptyDir in the pod), so the root filesystem can be read-only
client_body_temp_path /tmp/client_body;
proxy_temp_path /tmp/proxy;
fastcgi_temp_path /tmp/fastcgi;
uwsgi_temp_path /tmp/uwsgi;
scgi_temp_path /tmp/scgi;
server {
listen 8080;
root /usr/share/nginx/html;
index index.html;
charset utf-8;
server_tokens off;
# The image logs to files under /var/log/nginx; send access logs to the pod log instead
access_log /dev/stdout main;
# Show the page's data and source files as text (in server context this replaces the inherited types)
include /etc/nginx/mime.types;
types {
text/plain yaml py;
}
gzip on;
gzip_types text/plain text/css text/csv text/javascript application/javascript application/json;
add_header Cache-Control "no-cache" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
location = /healthz { access_log off; default_type text/plain; return 200 "ok\n"; }
location / { try_files $uri $uri/ =404; }
}