mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 00:34:26 +01:00
Add backup for caddy
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
96d4284d64
commit
4dc0d9f56a
@ -17,8 +17,6 @@ wordpress.bensuperpc.org {
|
|||||||
file_server
|
file_server
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
|
|
||||||
# metrics /metrics
|
|
||||||
|
|
||||||
@disallowed {
|
@disallowed {
|
||||||
path /xmlrpc.php
|
path /xmlrpc.php
|
||||||
path *.sql
|
path *.sql
|
||||||
|
@ -30,11 +30,31 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
|
caddy_backup:
|
||||||
|
image: mazzolino/restic:latest
|
||||||
|
container_name: caddy_backup
|
||||||
|
profiles:
|
||||||
|
- caddy
|
||||||
|
depends_on:
|
||||||
|
- caddy
|
||||||
|
restart: on-failure:5
|
||||||
|
env_file:
|
||||||
|
- ./caddy/env/caddy_backup.env
|
||||||
|
volumes:
|
||||||
|
- caddy_backup:/mnt/restic
|
||||||
|
- caddy_data:/data:ro
|
||||||
|
networks:
|
||||||
|
- infra-network
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
caddy_data:
|
caddy_data:
|
||||||
name: caddy_data
|
name: caddy_data
|
||||||
caddy_config:
|
caddy_config:
|
||||||
name: caddy_config
|
name: caddy_config
|
||||||
|
caddy_backup:
|
||||||
|
name: caddy_backup
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
infra-network:
|
infra-network:
|
||||||
|
9
infrastructure/caddy/env/caddy_backup.env
vendored
Normal file
9
infrastructure/caddy/env/caddy_backup.env
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#RUN_ON_STARTUP=true
|
||||||
|
BACKUP_CRON=*/30 * * * *
|
||||||
|
RESTIC_REPOSITORY=/mnt/restic
|
||||||
|
RESTIC_BACKUP_SOURCES=/data
|
||||||
|
RESTIC_PASSWORD=YFQh8v3Wi95v0p6h88D4u8C8z4gLfdMw
|
||||||
|
RESTIC_BACKUP_ARGS=--tag docker-volumes --verbose
|
||||||
|
#RESTIC_FORGET_ARGS=--prune --keep-last 8 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 4
|
||||||
|
#RESTIC_PRUNE_ARGS=
|
||||||
|
RESTIC_CHECK_ARGS=--read-data-subset=20%
|
Loading…
Reference in New Issue
Block a user