refactor: remove unused backup services and update environment configurations
This commit is contained in:
parent
810d7e0cb9
commit
03b9a3183b
5 changed files with 10 additions and 188 deletions
|
@ -46,71 +46,6 @@ services:
|
|||
networks:
|
||||
- backend
|
||||
|
||||
backup:
|
||||
image: registry.git.base23.de/base23/backup/resticker:${RESTICKER_TAG:?RESTICKER_TAG is not configured}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
PRE_COMMANDS: |-
|
||||
cd /compose-project/
|
||||
[[ $($(docker compose &>/dev/null); echo "$?") -eq 0 ]] || apk add --no-cache docker-cli-compose
|
||||
docker compose exec -T postgresql pg_dump -U ${PG_USER:-authentik} -d ${PG_DB:-authentik} -f /var/lib/postgresql/backups/${PG_DB:-authentik}.sql
|
||||
RUN_ON_STARTUP: "false"
|
||||
BACKUP_CRON: "00 32 2 * * *"
|
||||
RESTIC_REPOSITORY: sftp://${RESTIC_REPO_USER:?Restic repository user is required}@${RESTIC_REPO_ADDRESS:?Restic repository address is requried}:${RESTIC_REPO_PORT:?Restic repository port is required}//backup
|
||||
RESTIC_PASSWORD: '${RESTIC_REPO_PASSWORD:?Restic repository password is required}'
|
||||
RESTIC_BACKUP_SOURCES: /var/lib/postgresql/backups /var/lib/authentik/backups /var/lib/lego/backups
|
||||
RESTIC_BACKUP_ARGS: >-
|
||||
--tag ${RESTIC_TAG:?Restic tag is required}
|
||||
--verbose
|
||||
RESTIC_FORGET_ARGS: >-
|
||||
--keep-last 10
|
||||
--keep-daily 7
|
||||
--keep-weekly 5
|
||||
--keep-monthly 12
|
||||
TZ: Europe/Berlin
|
||||
volumes:
|
||||
- ./data/restic/ssh/:/run/secrets/.ssh:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./docker-compose.yml:/compose-project/docker-compose.yml:ro
|
||||
- ./.env:/compose-project/.env:ro
|
||||
- backups_db:/var/lib/postgresql/backups:ro
|
||||
- ./data/authentik/certs:/var/lib/authentik/backups/certs:ro
|
||||
- ./data/authentik/custom-templates:/var/lib/authentik/backups/templates:ro
|
||||
- ./data/authentik/media:/var/lib/authentik/backups/media:ro
|
||||
- ./data/.lego:/var/lib/lego/backups:ro
|
||||
|
||||
prune-backup:
|
||||
image: registry.git.base23.de/base23/backup/resticker:${RESTICKER_TAG:?RESTICKER_TAG is not configured}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
SKIP_INIT: "true"
|
||||
RUN_ON_STARTUP: "false"
|
||||
PRUNE_CRON: "00 47 3 * * *"
|
||||
RESTIC_REPOSITORY: sftp://${RESTIC_REPO_USER:?Restic repository user is required}@${RESTIC_REPO_ADDRESS:?Restic repository address is requried}:${RESTIC_REPO_PORT:?Restic repository port is required}//backup
|
||||
RESTIC_PASSWORD: '${RESTIC_REPO_PASSWORD:?Restic repository password is required}'
|
||||
TZ: Europe/Berlin
|
||||
volumes:
|
||||
- ./data/restic/ssh/:/run/secrets/.ssh:ro
|
||||
|
||||
# prüft ob backups noch in Ordnung sind, evtl. erweitern zum prüfen der Daten
|
||||
check-backup:
|
||||
image: registry.git.base23.de/base23/backup/resticker:${RESTICKER_TAG:?RESTICKER_TAG is not configured}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
#RUN_ON_STARTUP: "true"
|
||||
SKIP_INIT: "true"
|
||||
CHECK_CRON: "00 08 04 * * *"
|
||||
RESTIC_REPOSITORY: sftp://${RESTIC_REPO_USER:?Restic repository user is required}@${RESTIC_REPO_ADDRESS:?Restic repository address is requried}:${RESTIC_REPO_PORT:?Restic repository port is required}//backup
|
||||
RESTIC_PASSWORD: ${RESTIC_REPO_PASSWORD}
|
||||
#POST_COMMANDS_FAILURE: echo "Post Command Failure test" > /restic/message
|
||||
TZ: Europe/Berlin
|
||||
volumes:
|
||||
- ./data/restic/ssh/:/run/secrets/.ssh:ro
|
||||
|
||||
restore-cli:
|
||||
image: registry.git.base23.de/base23/backup/resticker:${RESTICKER_TAG:?RESTICKER_TAG is not configured}
|
||||
entrypoint: /entrypoint-restore
|
||||
|
||||
volumes:
|
||||
backups_db:
|
||||
driver: local
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue