guts/tools/forum-nginx-default.conf
type-two 1233a9effe [lane F] The stale-edge fix, prepared but not applied
The step-5 check added in the previous commit failed on its first real deploy, and it was
right: cf-cache-status HIT, age 158, cache-control max-age=14400, and the edge serving the
PREVIOUS boot.js. forum-nginx sends no Cache-Control for /gutsy/ at all, so Cloudflare applies
its 4-hour default to a game that ships un-versioned ES modules with no build step — what the
edge holds is code, not assets.

tools/forum-nginx-default.conf is the container's config with a /gutsy/ block adding
Cache-Control: no-cache (store, but revalidate — the files are etag'd, so it costs a 304).
Scoped to /gutsy/; nothing else on partly.party is touched. tools/CACHE.md has the measurement
and the two commands.

NOT APPLIED. Copying a file into the live forum-nginx container is gated for me, which is the
right gate on shared infrastructure hosting partly.party — I have not tried to route around it.
Until John runs it, a deploy reaches players when the 4-hour TTL lapses or the cache is purged.
The container has no bind mount for that config, so a force-recreate wipes the block; the file
is in the repo so re-applying is the same two commands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 22:35:05 +10:00

39 lines
1.5 KiB
Plaintext

# forum-nginx /etc/nginx/conf.d/default.conf — canonical copy (2026-07-20).
# The live container has NO bind mount for this file; if the container is ever
# recreated, restore with:
# scp forum-nginx-default.conf humanjing@100.71.119.27:/tmp/default.conf
# ssh humanjing@100.71.119.27 "docker cp /tmp/default.conf forum-nginx:/etc/nginx/conf.d/default.conf && docker exec forum-nginx nginx -s reload"
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# GUTS (/gutsy/) ships as UN-VERSIONED ES modules with no build step, so what an edge
# cache holds here is CODE, not assets. The origin was sending no Cache-Control at all,
# so Cloudflare applied its 4-hour default: a deploy landed on the box and players kept
# running the previous build for up to four hours, silently. Revalidate every request —
# the files are small, etag'd, and a 304 costs nothing.
location /gutsy/ {
root /usr/share/nginx/html;
add_header Cache-Control "no-cache";
}
# arcade express API (counter / guestbook / sando leaderboards). The app
# runs in the arcade-landing container on the shared forum_default network.
location /arcade-api/ {
proxy_pass http://arcade-landing:3001/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}