use variables for a variable path
This commit is contained in:
parent
238394b255
commit
3b9794fdd1
1 changed files with 6 additions and 5 deletions
|
@ -148,13 +148,14 @@ services:
|
|||
image: registry.git.base23.de/base23/backup/resticker:0.17.0
|
||||
environment:
|
||||
PRE_COMMANDS: |-
|
||||
cd /sso.base23.de/
|
||||
cd /\${RESTIC_TAG}/
|
||||
[[ $($(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: "true"
|
||||
BACKUP_CRON: "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_PASSWORD: '${RESTIC_REPO_PASSWORD:?Restic repository password is required}'
|
||||
RESTIC_TAG: '${RESTIC_TAG:?Restic repository tag 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}
|
||||
|
@ -168,8 +169,8 @@ services:
|
|||
volumes:
|
||||
- ./data/restic/ssh/:/run/secrets/.ssh:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./docker-compose.yml:/sso.base23.de/docker-compose.yml:ro
|
||||
- ./.env:/sso.base23.de/.env:ro
|
||||
- ./docker-compose.yml:/${RESTIC_TAG}/docker-compose.yml:ro
|
||||
- ./.env:/${RESTIC_TAG}/.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
|
||||
|
@ -183,7 +184,7 @@ services:
|
|||
RUN_ON_STARTUP: "true"
|
||||
PRUNE_CRON: "2 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}
|
||||
RESTIC_PASSWORD: '${RESTIC_REPO_PASSWORD:?Restic repository password is required}'
|
||||
TZ: Europe/Berlin
|
||||
volumes:
|
||||
- ./data/restic/ssh/:/run/secrets/.ssh:ro
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue