generated from web/flango
chore(deploy): provision Forgejo runner, registry and deploy secrets #8
Labels
No labels
NaNs
area/backup
area/dsh
area/forgejo
area/host
area/security
area/web
bootcamp
needs-operator
note
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
web/web-frontend#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Scope
Turn the scaffolded Forgejo workflows into a working deployment pipeline.
Needs
REGISTRY_USER,REGISTRY_TOKEN; for deploy:DEPLOY_SSH_KEY,DEPLOY_HOST,DEPLOY_USER,DEPLOY_PATH.git.pvlb.devsodocker compose pullworks.127.0.0.1:8000and setSITE_URL,TRUST_PROXY=1,SESSION_COOKIE_SECURE=1./healthz,/,/de/,/admin.Acceptance
The publish workflow builds and pushes an image on
master, and a manualworkflow_dispatchdeploy updates the host.Moved from pvlb-infra/vps-setup#23 (created in the wrong repo by the issue tool's default).
While this is pending, the public apex is not bare:
pvlb.devandwww.pvlb.devserve a temporary static holding page from the control repo (pvlb-infra/vps-setup:edge/welcome/, Caddy block inedge/Caddyfile, installed withbin/deploy-edge-local). Commands, backup path and rollback are in note pvlb-infra/vps-setup#35.When the real deployment goes live: retire that Caddy site block (or point it at the app) and remove
edge/welcome/, so the placeholder does not linger. The page already declareshttps://pvlb.dev/as its canonical URL, and it is currently indexable.web/flangonow has a worked reference for this (4ef7abe, CI run #1168 green). Reuse it rather than re-deriving:deploy/compose.yaml— image pinned byIMAGE_TAG, SQLite named volume,127.0.0.1:8000, healthcheck, 512 MiB capdeploy/deploy.sh— pins the tag, pulls, waits up to 120 s forhealthy, rolls back on failure; forward-only migrations caveat documenteddeploy/receive.sh— SSH forced command: the deploy key can only submit anX.Y.Z, thensudo -u dockersvc deploy.sh;restrict,command=...entry inauthorized_keys.forgejo/workflows/publish.yml— a real publish only on av*tag; missing registry secrets skip the push with a warning (checked in shell, notsecrets.*inif:).forgejo/workflows/deploy.yml— manual dispatch,DEPLOY_SSH_KEY/DEPLOY_KNOWN_HOSTS/DEPLOY_HOST/DEPLOY_USER/DEPLOY_PORT; no runner on prodDifferences from the sketch above worth keeping:
DEPLOY_PATHis replaced by the fixed/srv/dockersvc/<service>dir; publishing is tag-based, never onmaster; and production never runs:latest.Two items not in this issue's list yet:
data/ + .env, so a named Docker volume is not covered. Add the service to/usr/local/sbin/pvlb-backup.sh(stop, tar.env+ volume_data, start) before go-live; exact edit in flangodeploy/README.md.8000/tcploopback toops/srvdevops/portmap.md.The apex switch must keep
bind 104.152.49.193and the/.well-known/matrix/*handler (both Caddy traps are in the runbook). Full runbook:web/flango@4ef7abe→deploy/README.md, andAGENTS.d/deployment.mdin the private clone.Tag
v0.1.0was pushed on 2026-11-26. The publish workflow built the image successfully after fixing atomllib/Python-version bug in the workflow, but skipped the registry push:REGISTRY_USERandREGISTRY_TOKENare not set in the repository secrets.Run/log: https://git.pvlb.dev/web/web-frontend/actions/runs/78
After adding both secrets, re-run the
publishworkflow forv0.1.0(or re-push the tag). Then the manual deploy workflow can pullgit.pvlb.dev/web/web-frontend:0.1.0.