mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
scripts/compose-dr-drill.sh plays docs/ops/disaster-recovery.md against real containers: it builds the image from the checkout, starts the bundled compose stack with fixed throwaway keys, seeds the demo account and a Guardian with a managed profile (through the app's own code), writes a reading with an encrypted note through the API, and waits for the scheduled database-backup job to take the dump. It then keeps only the dump files, destroys every volume, starts a new stack, restores with `docker compose run --rm db-restore latest`, counts every table against the manifest apart from the restore, and boots the app: health, the demo login, the note read back, a document opened, the Guardian still seeing the profile. DRILL_MUTATION breaks one step on purpose (wrong-key, skip-table, non-empty-target), and the drill fails on each. The workflow runs it on pull requests that touch the compose file, the image, the entrypoint or the dump and restore code, nightly, and by hand.