mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 00:34:26 +01:00
Add backup for wordpress
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
7989688e8f
commit
572c9bc4bb
2
Makefile
2
Makefile
@ -13,7 +13,7 @@
|
||||
|
||||
DOCKER := docker
|
||||
|
||||
PROFILES := caddy wordpress adminer backup syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea
|
||||
PROFILES := caddy wordpress adminer syncthing uptime-kuma jellyfin qbittorrent psitransfer gitea
|
||||
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
||||
|
||||
# gitea-runner watchtower transmission
|
||||
|
@ -1,32 +0,0 @@
|
||||
services:
|
||||
# Backup
|
||||
backup:
|
||||
image: mazzolino/restic:latest
|
||||
container_name: backup
|
||||
profiles:
|
||||
- backup
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/backup.env
|
||||
volumes:
|
||||
- backup:/mnt/restic
|
||||
- caddy_data:/data/caddy_data:ro
|
||||
- caddy_config:/data/caddy_config:ro
|
||||
# - gitea_data:/data/gitea_data:ro
|
||||
# - gitea_config:/data/gitea_config:ro
|
||||
# - wordpress_db:/data/wordpress_db:ro
|
||||
# - wordpress:/data/wordpress:ro
|
||||
# - jellyfin_config:/data/jellyfin_config:ro
|
||||
# - jellyfin_data:/data/jellyfin_data:ro
|
||||
# - jellyfin_cache:/data/jellyfin_cache:ro
|
||||
# - qbittorrent_config:/data/qbittorrent_config:ro
|
||||
# - qbittorrent_data:/data/qbittorrent_data:ro
|
||||
# - uptimekuma_data:/data/uptimekuma_data:ro
|
||||
networks:
|
||||
- infra-network
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
volumes:
|
||||
backup:
|
||||
name: backup
|
@ -39,8 +39,27 @@ services:
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
wordpress_backup:
|
||||
image: mazzolino/restic:latest
|
||||
container_name: wordpress_backup
|
||||
profiles:
|
||||
- wordpress
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/backup.env
|
||||
volumes:
|
||||
- wordpress_backup:/mnt/restic
|
||||
- wordpress_db:/data/wordpress_db:ro
|
||||
- wordpress:/data/wordpress:ro
|
||||
networks:
|
||||
- infra-network
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
volumes:
|
||||
wordpress_db:
|
||||
name: wordpress_db
|
||||
wordpress:
|
||||
name: wordpress
|
||||
name: wordpress
|
||||
wordpress_backup:
|
||||
name: wordpress_backup
|
5
env/backup.env
vendored
5
env/backup.env
vendored
@ -1,8 +1,9 @@
|
||||
#RUN_ON_STARTUP=true
|
||||
BACKUP_CRON=0 * * * *
|
||||
RESTIC_REPOSITORY=/mnt/restic
|
||||
RESTIC_BACKUP_SOURCES=/data
|
||||
RESTIC_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
||||
#RESTIC_BACKUP_ARGS=
|
||||
#RESTIC_FORGET_ARGS=--prune --keep-last 14 --keep-daily 1
|
||||
RESTIC_BACKUP_ARGS=--tag docker-volumes --verbose
|
||||
RESTIC_FORGET_ARGS=--prune --keep-last 14 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 2
|
||||
#RESTIC_PRUNE_ARGS=
|
||||
RESTIC_CHECK_ARGS=--read-data-subset=20%
|
Loading…
Reference in New Issue
Block a user