add backup label
This commit is contained in:
parent
9a6f96952b
commit
3d21efaa48
|
@ -51,6 +51,11 @@ services:
|
|||
start_period: 1m
|
||||
rallly_db:
|
||||
image: postgres:14.8
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "true"
|
||||
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat /run/secrets/db_password) pg_dump -U postgres $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
|
||||
backupbot.backup.post-hook: "rm -rf /var/lib/postgresql/data/backup.sql"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
secrets:
|
||||
|
|
Loading…
Reference in New Issue