Added automated backups.

This commit is contained in:
oscarg
2026-08-11 08:21:56 +00:00
parent 28143427ff
commit 7db528d39b
2 changed files with 26 additions and 1 deletions
+9 -1
View File
@@ -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=
+17
View File
@@ -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: