fix(ci): share one nginx-vhost renderer; drop unused deploy.sh #5
Reference in New Issue
Block a user
Delete Branch "fix/render-drift-remove-deploy-sh"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
cichlid.internal(and ~a dozen other internal vhosts on oolon) have been serving certs that expired days ago, even though fresh certs sit renewed on disk. Root cause is a CI drift bug in this repo, not in the consuming services.deploy.ymlandrefresh.ymleach renderedasset/nginx/site.conf.tmplwith their own inline Python substitution. Commitbb2f5b1templated the listen line as{{WEB_LISTEN}}(moving the vhost behind oolon's stream SNI router) and taught the template +deploy.yml+deploy.shabout it — but notrefresh.yml. So the nightly refresh (cron17 4 * * *) rsynced a literallisten {{WEB_LISTEN}};into/etc/nginx/conf.d/rob.tn.conf.Because the rendered file is written into the live
conf.dbeforenginx -truns, that one unrendered placeholder failed the config test for the whole edge and left the wreckage in place — freezing every vhost reload on oolon, including thestep@*.timercert renewals. Certs lapsed on the wire while their renewals piled up unused on disk.A live fix to
rob.tn.confwould be undone by the next 04:17 UTC refresh, so the fix has to be in the pipeline.What
script/render-site-conf.py, called by both workflows, so they can no longer drift on what they substitute.{{PLACEHOLDER}}lacks an env value or survives substitution. A forgotten/misnamed variable is now a red run on the runner instead of a broken vhost on the edge (this exact incident would have failed loudly before shipping).WEB_LISTENtorefresh.yml'senv.{{DOCROOT}}→{{WEB_ROOT}}so every placeholder maps to the env var of the same name.script/deploy.sh— the third, unused renderer of the same template (superseded by the Actions workflows) and a standing source of drift.readme.md/CLAUDE.mdupdated to the Actions-only deploy path.Validation
render-site-conf.pyrenders the correct vhost from the full env (listen 127.0.0.1:14443 ssl proxy_protocol, no surviving{{ }}).WEB_LISTENunset (the oldrefresh.ymlstate) it exits non-zero and writes no file.{{DOCROOT}}ordeploy.shreferences remain.Merging this heals oolon
A merge to
maintriggersdeploy.yml, which re-renders the correctrob.tn.conf;nginx -tthen passes (rob.tn.conf is the only broken file) and the reload lands, so cichlid.internal and the other frozen vhosts immediately pick up their current on-disk certs. The next nightly refresh stays correct too.Known follow-up (out of scope — needs a sudoers change +
infra-setup.shre-run on oolon)The rendered vhost is still rsynced straight into the live
conf.dand only thennginx -t'd, so a valid-but-wrong config (e.g. a directivenginx -tcan't catch acrosshttp{}/stream{}) could still wedge nginx. A stage → validate → swap with rollback would close that, but thegitea_ciscoped sudoers only permitsrsync … rob.tn.conf(nocp/mv/installfor the vhost), so it needs a provisioning change and is left for a separate PR.🤖 Generated with Claude Code