--- services: geoipupdate: image: "maxmindinc/geoipupdate:latest" volumes: - "geoip:/usr/share/GeoIP" environment: GEOIPUPDATE_EDITION_IDS: "GeoLite2-City GeoLite2-ASN" GEOIPUPDATE_FREQUENCY: "8" GEOIPUPDATE_ACCOUNT_ID: "${GEOIPUPDATE_ACCOUNT_ID:?MaxMind GeoIP account ID required}" GEOIPUPDATE_LICENSE_KEY: "${GEOIPUPDATE_LICENSE_KEY:?MaxMind GeoIP license key required}" postgresql: image: docker.io/library/postgres:${POSTGRES_TAG:?POSTGRES_TAG is not configured} volumes: - database:/var/lib/postgresql/data - backups_db:/var/lib/postgresql/backups networks: - backend redis: image: docker.io/library/redis:${REDIS_TAG:?REDIS_TAG is not configured} networks: - backend server: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:?AUTHENTIK_TAG is not configured} environment: B23_ALLOW_UP: ${B23_ALLOW_UP:?Use the script ./scripts/compose.sh to run this compose!} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS:?PG_PASS is required. - Password for authentik's postgresql database} ports: [] networks: - backend worker: image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:?AUTHENTIK_TAG is not configured} environment: AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS:?PG_PASS is required. - Password for authentik's postgresql database} volumes: - /var/run/docker.sock:/var/run/docker.sock - ./data/authentik/media:/media - ./data/authentik/certs:/certs - ./data/authentik/custom-templates:/templates - geoip:/geoip 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 geoip: driver: local networks: backend: