What and why
The backup container in docker-compose.yml is currently a stub that sleeps forever. A database with no backup is a single point of failure.
Done when
The db-backup service runs pg_dump on a cron schedule (daily) and uploads a compressed dump to a configurable S3 bucket. The S3 bucket name, credentials, and schedule are read from environment variables. A manual trigger (docker compose exec db-backup /backup.sh) also works. docs/runbooks/restore-db.md documents the restore procedure.
Notes
Use prodrigestivill/postgres-backup-s3 as the base image — it handles everything with env vars, no custom scripting needed.
What and why
The backup container in
docker-compose.ymlis currently a stub that sleeps forever. A database with no backup is a single point of failure.Done when
The
db-backupservice runspg_dumpon a cron schedule (daily) and uploads a compressed dump to a configurable S3 bucket. The S3 bucket name, credentials, and schedule are read from environment variables. A manual trigger (docker compose exec db-backup /backup.sh) also works.docs/runbooks/restore-db.mddocuments the restore procedure.Notes
Use
prodrigestivill/postgres-backup-s3as the base image — it handles everything with env vars, no custom scripting needed.