version: "2.1" services: backup_gitlab: image: remifilament/duplicity:postgres # Until https://github.com/Tecnativa/docker-duplicity/pull/324 is merged # image: ghcr.io/tecnativa/docker-duplicity-postgres:master # Once https://github.com/Tecnativa/docker-duplicity/pull/324 is merged hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-gitlab environment: DST: "swift://gitlab_{{ inventory_hostname|lower }}" PGDATABASE: "none" PGPASSWORD: "none" PGUSER: "none" PASSPHRASE: "{{ git_backup_pass | default(srv_proxy_pass) }}" SWIFT_USERNAME: "{{ swift_odoo_username }}" SWIFT_PASSWORD: "{{ swift_odoo_password }}" SWIFT_AUTHURL: "{{ swift_odoo_authurl }}" SWIFT_AUTHVERSION: {{ swift_odoo_authversion }} SWIFT_TENANTNAME: "{{ swift_odoo_tenantname }}" SWIFT_TENANTID: "{{ swift_odoo_tenantid }}" SWIFT_REGIONNAME: "{{ swift_odoo_regionname }}" JOB_200_WHEN: "never" JOB_300_WHAT: "dup full $$SRC $$DST" JOB_302_WHAT: "dup remove-all-but-n-full 30 --force $$DST $$@" JOB_302_WHEN: "daily" command: - /etc/periodic/daily/jobrunner volumes: - gitlab_backup_cache:/root/.cache/duplicity/ - gitlab_config:/mnt/backup/src/config:z - /var/lib/docker/volumes/gitlab_data/_data/backups/:/mnt/backup/src/data_backups:z volumes: gitlab_backup_cache: gitlab_config: external: true