fix: a refused database move leaves the host as it was
CI / check (pull_request) Successful in 19s

On .50 a deploy refused by the database step had already copied the refused
version's compose files and written its NETORK_VERSION to .env: a hand-typed
`docker compose up -d` would have carried postgres back to the old volume.
The database step now runs before .env is written, the previous compose files
are kept as .prev while the new ones are fetched, and a refusal (exit 3) puts
them back. Checked on .50: checksums of both compose files and .env unchanged
after a refused deploy.
This commit is contained in:
Christian Manivong committed 2026-10-21 00:44:15 +02:00
1 parent 4d3a7eb1f4
commit 1e87478f7f
3 files changed
+56 -17

No files matched your search

+3 -1
View File
@@ -102,7 +102,9 @@ started earlier pulls whatever image the registry held before, which is stale.
over ssh's stdin). On the volume it already uses, it is recreated only if its image
or definition changed, so a new minor release arrives with the next deploy. If the
compose files name another volume (a new major version), a normal deploy stops
here before anything changed; see *Moving the bundled database*.
here before anything changed: the host keeps its previous compose files and
`.env`, so a hand-typed `docker compose up -d` cannot move the database either.
See *Moving the bundled database*. This step runs before `.env` is written.
6. Reconciles the broker, `redis` (Valkey): recreated only if its definition changed,
and waited for until healthy, before the engine comes up against it. If it does
not get healthy within 120 s, the deploy stops with the old engine running.