The deploy path defaulted to emi/thermograph/{backend,frontend} and logged in
to the registry as `emi`. Neither is a real account: `emi` is a user_redirect
to admin_emi, left from renaming that account. Every package, repo and access
token belongs to admin_emi, and build-push.yml already publishes to
${github.repository}/<domain> — that is, admin_emi/thermograph/*.
Point the deploy-side defaults, the registry logins and the clone URLs at
admin_emi so nothing resolves through the redirect.
forgejo_db has been at 0/1 replicas since 2026-07-29 01:24 UTC. Postgres hit
an invalid data-directory lock file ("could not open file postmaster.pid ...
performing immediate shutdown because data directory lock file is invalid")
and exited 0. With restart_policy.condition=on-failure, Swarm read the zero
status as successful completion, marked the task Complete, and never
rescheduled it.
The forgejo service itself stayed Up and kept serving its homepage, so the
outage presented as every repository page, the whole API and all CI returning
500 with "dial tcp: lookup db on 127.0.0.11:53: no such host" — including the
auth path, which is why API calls reported "user does not exist [uid: 0]"
rather than a database error.
on-failure cannot distinguish "finished successfully" from "shut itself down
and should be restarted", and Postgres exits 0 on several such paths, so it is
the wrong policy for an always-on stateful service.
This is the durable fix; it does not restart the currently stopped task.