Added automated backups.
This commit is contained in:
+9
-1
@@ -5,8 +5,16 @@ DOMAIN_NAME=example.com
|
||||
WEBMAIL_SUBDOMAIN=mail
|
||||
MAIL_SUBDOMAIN=mx
|
||||
|
||||
# Compose Profiles (only backup-enabled exists)
|
||||
COMPOSE_PROFILES=
|
||||
|
||||
# Restic Config (Only fill out if enabling backups)
|
||||
RESTIC_REPOSITORY=""
|
||||
RESTIC_PASSWORD=""
|
||||
RESTIC_HOSTNAME=""
|
||||
|
||||
# Secret Keys
|
||||
# This should be generated automatically.
|
||||
# These should be generated with `openssl rand -base64 32`.
|
||||
BULWARK_SECRET=
|
||||
OAUTH_SECRET=
|
||||
|
||||
|
||||
@@ -63,6 +63,23 @@ services:
|
||||
- ./service_data/cert_sync:/data
|
||||
command: sh /data/sync-certs.sh
|
||||
|
||||
backup:
|
||||
image: mazzolino/restic
|
||||
container_name: backup
|
||||
restart: unless-stopped
|
||||
hostname: ${RESTIC_HOSTNAME}
|
||||
profiles:
|
||||
- backup-enabled
|
||||
environment:
|
||||
- BACKUP_CRON="0 2 * * *"
|
||||
- RUN_ON_STARTUP=true
|
||||
- RESTIC_REPOSITORY=${RESTIC_REPOSITORY}
|
||||
- RESTIC_PASSWORD=${RESTIC_PASSWORD}
|
||||
- RESTIC_FORGET_ARGS=--keep-last 7 --keep-daily 7 --keep-weekly 4 --prune
|
||||
volumes:
|
||||
- ~/.ssh:/run/secrets/.ssh:ro
|
||||
- /var/lib/docker/volumes:/data/volumes:ro
|
||||
|
||||
volumes:
|
||||
stalwart-etc:
|
||||
stalwart-data:
|
||||
|
||||
Reference in New Issue
Block a user