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:
|
networks:
|
||||||
- external
|
- external
|
||||||
|
|
||||||
mautrix-slack:
|
#mautrix-slack:
|
||||||
container_name: mautrix-slack
|
# container_name: mautrix-slack
|
||||||
image: dock.mau.dev/mautrix/slack:latest
|
# image: dock.mau.dev/mautrix/slack:latest
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
volumes:
|
# volumes:
|
||||||
- $DATA/matrix/slack:/data
|
# - $DATA/matrix/slack:/data
|
||||||
networks:
|
# networks:
|
||||||
- matrix
|
# - matrix
|
||||||
- storage
|
# - storage
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -14,7 +14,7 @@ services:
|
||||||
- SERVERPORT=51822
|
- SERVERPORT=51822
|
||||||
- PEERS=10
|
- PEERS=10
|
||||||
- PEERDNS=auto
|
- PEERDNS=auto
|
||||||
- INTERNAL_SUBNET=10.13.14.0
|
- INTERNAL_SUBNET=10.15.14.0
|
||||||
- ALLOWEDIPS=0.0.0.0/0
|
- ALLOWEDIPS=0.0.0.0/0
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- 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:
|
services:
|
||||||
borg:
|
borgmatic:
|
||||||
container_name: borg
|
container_name: borgmatic
|
||||||
image: pschiffe/borg
|
image: ghcr.io/borgmatic-collective/borgmatic:latest
|
||||||
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/borg:/borg/repo
|
- $DATA:/mnt/source:ro
|
||||||
- $DATA/borg/config:/root
|
- $BACKUP:/mnt/borg-repository:rw
|
||||||
- $DATA:/borg/data/docker-data:ro
|
- $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
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
- BORG_REPO=/borg/repo
|
- TZ=Europe/Paris
|
||||||
- BORG_PASSPHRASE=${BORG_PASSPHRASE}
|
- BORG_PASSPHRASE=none
|
||||||
- BACKUP_DIRS=/borg/data
|
- BACKUP_CRON=0 5 * * *
|
||||||
- COMPRESSION=lz4
|
- RUN_ON_STARTUP=true
|
||||||
- PRUNE=1
|
networks:
|
||||||
restart: "no"
|
- storage
|
||||||
profiles:
|
|
||||||
- dnr
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue