Files
moments/asset/nginx/rob.tn.conf
rob thijssen 7843c2c13f chore(deploy): co-locate api + worker on anjie
nikola and frootmig are flagging power events and drive warnings on
the iLO interface and need drive replacement. Move both moments
components onto anjie.kosherinata.internal until those hosts are
back in service. Update the nginx upstream and the readme topology
table to match; the postgres pg_ident.conf on magrathea now needs
to map anjie's cert CN to both moments_ro and moments_rw (two lines
for the same cert_cn).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 08:24:21 +03:00

44 lines
1.2 KiB
Plaintext

upstream moments_api {
server anjie.kosherinata.internal:42424 max_fails=3 fail_timeout=30s;
keepalive 8;
}
server {
server_name rob.tn;
listen 443 ssl;
http2 on;
ssl_certificate /etc/letsencrypt/live/rob.tn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rob.tn/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
root /var/www/rob.tn;
index index.html;
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache" always;
}
location ~* \.(js|css|woff2?|ttf|eot|svg|png|jpg|jpeg|gif|ico|webp|avif)$ {
expires 30d;
add_header Cache-Control "public, max-age=2592000, immutable";
try_files $uri =404;
}
location /api/ {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://moments_api;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 30s;
proxy_connect_timeout 5s;
}
access_log /var/log/nginx/rob.tn.access.log;
error_log /var/log/nginx/rob.tn.error.log;
}