Add backup bot labels
This commit is contained in:
parent
2f7ed80cd9
commit
abe5537bb0
|
@ -105,6 +105,8 @@ services:
|
|||
deploy:
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=0.1.6+0.1.5"
|
||||
- "backupbot.backup=true"
|
||||
- "backupbot.backup.path=/app/uploads"
|
||||
|
||||
worker:
|
||||
image: "ghcr.io/karrot-dev/karrot-docker-images:0.1.5-backend"
|
||||
|
@ -191,6 +193,12 @@ services:
|
|||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||
- POSTGRES_USER=karrot
|
||||
- POSTGRES_DB=karrot
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup: "true"
|
||||
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/postgres-backup.sql"
|
||||
backupbot.backup.post-hook: "rm -rf /var/lib/postgresql/data/postgres-backup.sql"
|
||||
backupbot.backup.path: "/var/lib/postgresql/data/"
|
||||
|
||||
|
||||
configs:
|
||||
|
|
Loading…
Reference in New Issue