Roll back failed updates to the version that ran before

coreapps keeps copies of the app's service folder, .env and compose
file during an update. If it fails before the app answers, it tears
down needs the update added, restores the copies, starts the old
version and removes the new image. Data isn't rolled back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:22:04 -07:00
co-authored by Claude Opus 5.5
parent 8ef2112e3c
commit 4e0292fd91
5 changed files with 115 additions and 14 deletions
+9 -2
View File
@@ -344,8 +344,15 @@ Steps:
Authelia, for admins only
Later:
- [ ] A failed update leaves the new `services/<name>/` in place with the
old container running; keep the old folder until the update works
- Done 2026-12-03: a failed update rolls back. coreapps keeps copies of
`services/<name>/`, `.env` and `docker-compose.yml`; if anything fails
until the app answers (or on Ctrl-C), it runs the teardown of needs the
update added, puts the copies back, starts the old version and removes
the new image. Data (`/data`, database contents) isn't rolled back: a new
version that migrated its database can leave the old one unable to run.
Tested on dev.fedcom.net
- [ ] Back up the app's database (and `/data`?) before an update, to roll
back data too; or a `coreapps rollback` that restores it on request
- [ ] Uninstalling a need without removing the app (now refused)
- [ ] `bin/start` / `bin/stop` don't know coreapps' apps (see "Tell
Federated"); `restart: always` covers reboots