Files
momme-world/k8s/site/nginx.conf
T
momme 8d33460580
site / generated-is-current (push) Failing after 36s
site generator: commands/*.md with front matter -> k8s/site/
- build/build.mjs: one-file-per-command content (filename = command,
  underscores = spaces; help/suggestion/params/prefix/text/hidden in
  front matter; ${args} ${date} ${time} ${ls} ${help} resolved at runtime)
- generates index.html (banner + chips), commands.json (the single data
  source), hello.txt for curl, style.css via tailwind v4
- src/site.js is now dispatch-only over commands.json; typewriter kept
- src/telnet.py: stdlib telnet shell sharing commands.json
- k8s: python telnet sidecar in the pod + LoadBalancer service 23->2323
- .gitea/workflows/site.yml fails CI when k8s/site/ is not the built output
2026-10-14 01:14:28 +02:00

48 lines
1.1 KiB
Nginx Configuration File

# Mounted at /etc/nginx/conf.d/default.conf — everything here is http context.
# terminal people get the plain text version of the page
map $http_user_agent $root_doc {
default /index.html;
"~*(curl|wget|httpie|lynx|w3m|nc/)" /hello.txt;
}
server {
listen 8080;
server_name _;
root /var/www/html;
index index.html;
absolute_redirect off;
gzip on;
gzip_types text/css application/javascript text/plain image/svg+xml;
gzip_vary on;
# index.html is the app itself: never cache it, so a deploy is visible now
location = / {
try_files $root_doc =404;
add_header Cache-Control "no-store";
}
location = /index.html {
add_header Cache-Control "no-store";
}
location = /hello.txt {
add_header Cache-Control "no-store";
}
# the command data the terminal fetches at boot: same freshness rule
location = /commands.json {
add_header Cache-Control "no-store";
}
location ~* \.(css|js|svg)$ {
add_header Cache-Control "public, max-age=604800";
}
location / {
try_files $uri $uri/ =404;
}
}