Backup
This commit is contained in:
parent
2ea4f9ecab
commit
933ab0551a
|
@ -0,0 +1,47 @@
|
|||
services:
|
||||
ferdium-server:
|
||||
container_name: ferdium-server
|
||||
image: ferdium/ferdium-server:latest
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- APP_URL=ferdium.bhasher.com
|
||||
- DB_CONNECTION=pg
|
||||
- DB_HOST=postgres
|
||||
- DB_PORT=5432
|
||||
- DB_USER=postgres
|
||||
- DB_PASSWORD=$POSTGRES_PASSWORD
|
||||
- DB_DATABASE=ferdium
|
||||
- DB_SSL=false
|
||||
#- MAIL_CONNECTION=smtp
|
||||
#- SMTP_HOST=127.0.0.1
|
||||
#- SMTP_PORT=2525
|
||||
#- MAIL_SSL=false
|
||||
#- MAIL_USERNAME=username
|
||||
#- MAIL_PASSWORD=password
|
||||
#- MAIL_SENDER=noreply@ferdium.org
|
||||
- IS_CREATION_ENABLED=true
|
||||
- IS_DASHBOARD_ENABLED=true
|
||||
- IS_REGISTRATION_ENABLED=true
|
||||
- CONNECT_WITH_FRANZ=false
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.ferdium.rule=Host(`ferdium.bhasher.com`)"
|
||||
- "traefik.http.services.ferdium.loadbalancer.server.port=3333"
|
||||
- "traefik.http.routers.ferdium.tls=true"
|
||||
- "traefik.http.routers.ferdium.tls.certresolver=http"
|
||||
- "traefik.http.routers.ferdium.entrypoints=internalsecure"
|
||||
volumes:
|
||||
- $DATA/ferdium/data:/data
|
||||
- $DATA/ferdium/recipes:/app/recipes
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- storage
|
||||
- external
|
||||
|
||||
networks:
|
||||
storage:
|
||||
external: true
|
||||
external:
|
||||
external: true
|
|
@ -41,15 +41,15 @@ services:
|
|||
networks:
|
||||
- external
|
||||
|
||||
mautrix-slack:
|
||||
container_name: mautrix-slack
|
||||
image: dock.mau.dev/mautrix/slack:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- $DATA/matrix/slack:/data
|
||||
networks:
|
||||
- matrix
|
||||
- storage
|
||||
#mautrix-slack:
|
||||
# container_name: mautrix-slack
|
||||
# image: dock.mau.dev/mautrix/slack:latest
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - $DATA/matrix/slack:/data
|
||||
# networks:
|
||||
# - matrix
|
||||
# - storage
|
||||
|
||||
|
||||
networks:
|
||||
|
|
|
@ -14,7 +14,7 @@ services:
|
|||
- SERVERPORT=51822
|
||||
- PEERS=10
|
||||
- PEERDNS=auto
|
||||
- INTERNAL_SUBNET=10.13.14.0
|
||||
- INTERNAL_SUBNET=10.15.14.0
|
||||
- ALLOWEDIPS=0.0.0.0/0
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
source_directories:
|
||||
- /mnt/source
|
||||
repositories:
|
||||
- path: /mnt/borg-repository
|
||||
label: local
|
||||
|
||||
compression: lz4
|
||||
archive_name_format: 'backup-{now}'
|
||||
|
||||
keep_hourly: 12
|
||||
keep_daily: 7
|
||||
keep_weekly: 4
|
||||
keep_monthly: 6
|
||||
|
||||
|
||||
checks:
|
||||
- name: repository
|
||||
- name: archives
|
||||
check_last: 3
|
||||
|
||||
|
||||
before_backup:
|
||||
- echo "Starting a backup job."
|
||||
after_backup:
|
||||
- echo "Backup created."
|
||||
on_error:
|
||||
- echo "Error while creating a backup."
|
||||
|
||||
exclude_patterns:
|
||||
- '*.pyc'
|
||||
- '/*.cache'
|
||||
- '*/MediaCover'
|
||||
|
|
@ -0,0 +1 @@
|
|||
0 5 * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic --stats -v 0 2>&1
|
|
@ -1,19 +1,21 @@
|
|||
services:
|
||||
borg:
|
||||
container_name: borg
|
||||
image: pschiffe/borg
|
||||
borgmatic:
|
||||
container_name: borgmatic
|
||||
image: ghcr.io/borgmatic-collective/borgmatic:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /mnt/borg:/borg/repo
|
||||
- $DATA/borg/config:/root
|
||||
- $DATA:/borg/data/docker-data:ro
|
||||
- $DATA:/mnt/source:ro
|
||||
- $BACKUP:/mnt/borg-repository:rw
|
||||
- $CONFIG/borgmatic/etc:/etc/borgmatic.d
|
||||
- $DATA/borgmatic/borg:/root/.config/borg
|
||||
- $DATA/borgmatic/ssh:/root/.ssh
|
||||
- $DATA/borgmatic/cache:/root/.cache/borg
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- BORG_REPO=/borg/repo
|
||||
- BORG_PASSPHRASE=${BORG_PASSPHRASE}
|
||||
- BACKUP_DIRS=/borg/data
|
||||
- COMPRESSION=lz4
|
||||
- PRUNE=1
|
||||
restart: "no"
|
||||
profiles:
|
||||
- dnr
|
||||
- TZ=Europe/Paris
|
||||
- BORG_PASSPHRASE=none
|
||||
- BACKUP_CRON=0 5 * * *
|
||||
- RUN_ON_STARTUP=true
|
||||
networks:
|
||||
- storage
|
||||
|
||||
|
|
Loading…
Reference in New Issue