add postgres db #26

Merged
yksflip merged 4 commits from add-postgres-db into main 2022-05-18 08:36:27 +00:00
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 27e8e62675 - Show all commits

View File

@ -27,6 +27,12 @@ services:
interval: 10s
timeout: 5s
retries: 5
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql"
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
volumes:
postgres:
postgres: