2 Commits
Author SHA1 Message Date
Christian Manivong 1e87478f7f 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.
2026-10-21 00:44:15 +02:00
Christian Manivong 6e3ecb8680 feat: the bundled database on every deploy, and --infra-db to move it (NetOrk/netork#1308)
CI / check (pull_request) Failing after 28s
remote/database.sh runs on the host (over ssh's stdin) after .env and before
broker and engine:

- no bundled database: nothing to do;
- the volume it already uses: plain `up -d --wait`, recreated only on a changed
  image or definition, so a new PostgreSQL minor release arrives with the next
  deploy;
- another volume (a new major version): a normal deploy stops there, nothing
  changed; with --infra-db the engine stops, the old database is counted and
  dumped (kept in ~/netork/backups), the new container comes up on the new
  volume, restore, ANALYZE, counts and Alembic revision must match. The old
  volume stays, and deploying the previous version with --infra-db switches
  back onto it without a restore.

Checked on .50 in reconcile mode: the running postgres:16 container stayed as
it was. README describes the steps and the way back.
2026-10-20 23:15:48 +02:00