add restore hook
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
mayel 2023-07-29 10:42:21 +00:00
parent 7970e7c61e
commit 1c93adcf21
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ services:
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/"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'ls -la . && psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} < ./backup.sql && rm -f ./backup.sql'"
volumes:
postgres:
codimd_uploads: