Skip to content

Commit

Permalink
Switch to docker backup script that was added to the Zammad image.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Jun 11, 2024
1 parent b88f544 commit 7c2295a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# REDIS_VERSION=7.2.4-alpine
# RESTART=always
# Use a fixed version. You are responsible to update this to newer patch level versions yourself.
# VERSION=6.3.1
# VERSION=6.3.1-38
# You can also use floating versions that will give you automatic updates:
# VERSION=6.2 # all patchlevel updates
# VERSION=6 # including minor updates
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.override-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ version: '3.8'

services:

zammad-backup:
image: zammad-local

zammad-init:
image: zammad-local

Expand Down
21 changes: 8 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ x-shared:
POSTGRESQL_OPTIONS: ${POSTGRESQL_OPTIONS:-?pool=50}
POSTGRESQL_DB_CREATE:
REDIS_URL: ${REDIS_URL:-redis://zammad-redis:6379}
# Backup settings
BACKUP_DIR: "${BACKUP_DIR:-/var/tmp/zammad}"
BACKUP_TIME: "${BACKUP_TIME:-03:00}"
HOLD_DAYS: "${HOLD_DAYS:-10}"
TZ: "${TZ:-Europe/Berlin}"
# Allow passing in these variables via .env:
AUTOWIZARD_JSON:
AUTOWIZARD_RELATIVE_PATH:
Expand All @@ -31,7 +36,7 @@ x-shared:
ZAMMAD_SESSION_JOBS:
ZAMMAD_PROCESS_SCHEDULED:
ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS:
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.3.1}
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-6.3.1-38}
restart: ${RESTART:-always}
volumes:
- zammad-storage:/opt/zammad/storage
Expand All @@ -43,22 +48,12 @@ x-shared:
services:

zammad-backup:
<<: *zammad-service
command: ["zammad-backup"]
depends_on:
- zammad-railsserver
- zammad-postgresql
entrypoint: /usr/local/bin/backup.sh
environment:
<<: *zammad-environment
BACKUP_TIME: "03:00"
HOLD_DAYS: "10"
TZ: Europe/Berlin
image: postgres:${POSTGRES_VERSION:-15.6-alpine}
restart: ${RESTART:-always}
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
- ./scripts/backup.sh:/usr/local/bin/backup.sh:ro
user: 0:0

zammad-elasticsearch:
image: bitnami/elasticsearch:${ELASTICSEARCH_VERSION:-8.12.2}
Expand Down
74 changes: 0 additions & 74 deletions scripts/backup.sh

This file was deleted.

0 comments on commit 7c2295a

Please sign in to comment.