move zammad internal backups to compose overwrite

This commit is contained in:
2024-09-19 23:12:58 +02:00
parent 34be0c287e
commit ce314169cb
3 changed files with 43 additions and 20 deletions

View File

@ -7,6 +7,7 @@ TIMEOUT=600
#EXTRA_DOMAINS=', `www.zammad.example.com`'
LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
SECRET_DB_PASSWORD_VERSION=v1
SECRET_SMTP_PASSWORD_VERSION=v1
@ -28,3 +29,9 @@ SMTP_PORT=465
#SSO_PROVIDER_DOMAIN=authentik.example.com
#IDP_SSO_TARGET_URL=https://authentik.example.com/application/saml/zammad/sso/binding/init/
#IDP_SLO_SERVICE_URL=https://authentik.example.com/application/saml/zammad/slo/binding/redirect/
## Zammad internal backups
# COMPOSE_FILE="$COMPOSE_FILE:compose.backup.yml"
# BACKUP_TIME=03:00"
# HOLD_DAYS=10

36
compose.backup.yml Normal file
View File

@ -0,0 +1,36 @@
version: "3.8"
services:
zammad-backup:
image: ghcr.io/zammad/zammad:6.3.1-95
command: ["zammad-backup"]
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
user: 0:0
deploy:
labels:
backupbot.backup.volumes.zammad-backup: "false"
restart_policy:
condition: on-failure
environment:
POSTGRESQL_DB: zammad_production
POSTGRESQL_HOST: zammad-postgresql
POSTGRESQL_USER: zammad
POSTGRESQL_PASS_FILE: /run/secrets/db_password
POSTGRESQL_PORT: 5432
# Backup settings
BACKUP_DIR: "/var/tmp/zammad"
BACKUP_TIME: "${BACKUP_TIME:-03:00}"
#BACKUP_SLEEP: 86400
HOLD_DAYS: 10
DOMAIN:
entrypoint: /custom-entrypoint.sh
configs:
- source: entrypoint
target: /custom-entrypoint.sh
mode: 0555
secrets:
- db_password
volumes:
zammad-backup:

View File

@ -13,11 +13,6 @@ x-shared:
POSTGRESQL_OPTIONS: ?pool=50
POSTGRESQL_DB_CREATE:
REDIS_URL: redis://zammad-redis:6379
# Backup settings
BACKUP_DIR: "/var/tmp/zammad"
BACKUP_TIME: "${BACKUP_TIME:-03:00}"
#BACKUP_SLEEP: 86400
HOLD_DAYS: 10
TZ: "${TZ:-Europe/Berlin}"
# Allow passing in these variables via .env:
AUTOWIZARD_JSON:
@ -71,18 +66,6 @@ x-shared:
- admin_password
services:
zammad-backup:
<<: *zammad-service
command: ["zammad-backup"]
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
user: 0:0
deploy:
labels:
- "backupbot.backup=true"
- "backupbot.backup.path=/var/tmp/zammad"
zammad-elasticsearch:
image: bitnami/elasticsearch:8.14.3
deploy:
@ -167,8 +150,6 @@ services:
condition: on-failure
volumes:
- postgresql-data:/var/lib/postgresql/data
# Backup Restore
#- zammad-backup:/var/tmp/zammad:ro
secrets:
- db_password
healthcheck:
@ -227,7 +208,6 @@ volumes:
elasticsearch-data:
postgresql-data:
redis-data:
zammad-backup:
zammad-storage:
networks: