Files
schemas-app/nginx/nginx.conf
T
argoyle b6812b9d55
schemas-app / build (push) Successful in 59s
schemas-app / deploy-prod-frostmoln (push) Successful in 1m16s
feat: deploy to Frostmoln production (#391)
Moves the production deploy from AWS to the Frostmoln production cluster (namespace `schemas`), with unboundsoftware/schemas.

- `deploy-prod` (AWS, failing since CI left AWS) → `deploy-prod-frostmoln`: `deploy prod-frostmoln -n schemas`.
- Restricted Pod Security: `nginxinc/nginx-unprivileged` (uid 101, port 8080; 1.31.7 isn't published for it yet, so 1.31.6). `nginx.conf`: no `user`, pid and temp paths under `/tmp`, `listen 8080`. Configs copied with `--chmod=644`. Service is ClusterIP.
- `autoscale-prod`/`pdb-prod` → `-prod-frostmoln`; the ALB ingress → a Traefik one for `/` on `schemas.unbound.se` (the API's `/query` ingress wins on the longer path).

Checked locally (amd64): as uid 101 with all capabilities dropped, `/health`, `/` and SPA routes 200, security headers present.

**Merge with** the schemas PR, after infra#1878 is applied.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Ma8eHhW59hLAJuLzBnLvUu
Reviewed-on: #391
2026-10-15 21:16:08 +00:00

72 lines
2.0 KiB
Nginx Configuration File

worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
# Writable by the unprivileged (uid 101) worker.
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include /etc/nginx/mime.types;
default_type application/octet-stream;
types {
application/manifest+json webmanifest;
}
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
access_log off;
# Security headers
include /etc/nginx/security_headers.conf;
# Health check endpoint for Kubernetes
location = /health {
return 200 '{"status":"UP"}';
}
# all assets contain hash in filename, cache forever
location ^~ /assets/ {
include /etc/nginx/security_headers.conf;
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
try_files $uri =404;
}
# Nuxt generated files
location /_nuxt/ {
access_log /var/log/nginx/access.log main;
include /etc/nginx/security_headers.conf;
autoindex off;
expires off;
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
}
# Main application - SPA mode
location / {
access_log /var/log/nginx/access.log main;
include /etc/nginx/security_headers.conf;
autoindex off;
expires off;
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
try_files $uri $uri/ /index.html =404;
}
}
}