From ab3361f46d396ca171912806051ad854e369ec71 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Thu, 9 Dec 2021 01:34:01 +0200 Subject: [PATCH] Add backup-bot-two labels --- compose.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compose.yml b/compose.yml index e475e50..e4a022b 100644 --- a/compose.yml +++ b/compose.yml @@ -49,6 +49,8 @@ services: - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" - "coop-cloud.${STACK_NAME}.version=1.0.0+5.8.1" + - "backupbot.backup=true" + - "backupbot.backup.path=/var/www/html" db: image: "mariadb:10.6" @@ -64,6 +66,12 @@ services: secrets: - db_password - db_root_password + deploy: + labels: + - "backupbot.backup=true" + - "backupbot.backup.path=/tmp/dump.sql.gz" + - "backupbot.backup.post-hook=rm -f /tmp/dump.sql.gz" + - "backupbot.backup.pre-hook=mysqldump -u root -p`cat /run/secrets/db_root_password` wordpress | gzip > /tmp/dump.sql.gz" networks: backend: