Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • efbbc6ed605419d20d0ead2163b81a3f7ffef0d3
  • 16.0 par défaut protégée
  • 11.0
  • 18.0
  • 19.0
  • 14.0 protégée
  • 17.0
  • 15.0 protégée
  • 12.0 protégée
  • 10.0 protégée
10 résultats

14.0.Dockerfile

Blame
  • backup.yaml.j2 2,50 Kio
    version: "2.1"
    services:
        backup_odoo:
            image: ghcr.io/tecnativa/docker-duplicity-postgres:master
            hostname: {{ inventory_hostname_short | lower | regex_replace('_','') }}-{{ template_odoo_instance.key }}
            environment:
                DB_VERSION: "{{ [template_odoo_instance_setup.postgres_version | split('.') | first | int, 10] | max }}"
                DST: "swift://{{ template_odoo_instance.key }}_{{ inventory_hostname | lower }}"
                PGDATABASE: "{{ template_odoo_instance.value.db }}"
                PGUSER: "{{ template_odoo_instance.value.db_user }}"
                PGPASSWORD: "{{ template_odoo_instance.value.db_pass }}"
                PASSPHRASE: "{{ template_odoo_instance.value.odoo_backup_pass | default(template_odoo_instance.value.master_pass) }}"
                SWIFT_USERNAME: "{{ template_backup_account.value.username }}"
                SWIFT_PASSWORD: "{{ template_backup_account.value.password }}"
                SWIFT_AUTHURL: "{{ template_backup_account.value.authurl }}"
                SWIFT_AUTHVERSION: {{ template_backup_account.value.authversion }}
                SWIFT_TENANTNAME: "{{ template_backup_account.value.tenantname }}"
                SWIFT_TENANTID: "{{ template_backup_account.value.tenantid }}"
                SWIFT_REGIONNAME: "{{ template_backup_account.value.regionname }}"
                JOB_200_WHEN: "never"
                JOB_300_WHAT: "pg_dump --no-owner --format c --file $$SRC/$$PGDATABASE.pgdump && backup --full-if-older-than 6D"
                JOB_302_WHAT: "dup remove-all-but-n-full 5 --force $$DST $$@"
                JOB_302_WHEN: "daily"
            volumes:
                - {{ template_odoo_instance.key }}{{ template_backup_account.key }}_backup_cache:/root/.cache/duplicity/:z
                - {{ template_odoo_instance.key }}_filestore:/mnt/backup/src/odoo:z
    {% if template_odoo_instance.value.metabase | default(false) %}
                - {{ template_odoo_instance.key }}_metabase:/mnt/backup/src/metabase:z
    {% endif %}
            networks:
                - {{ template_odoo_instance.key }}_default
                - public
            command:
                - /etc/periodic/daily/jobrunner
    
    networks:
        {{ template_odoo_instance.key }}_default:
            external: true
        public:
            driver_opts:
                encrypted: 1
    
    volumes:
        {{ template_odoo_instance.key }}{{ template_backup_account.key }}_backup_cache:
        {{ template_odoo_instance.key }}_filestore:
            external: true
    {% if template_odoo_instance.value.metabase | default(false) %}
        {{ template_odoo_instance.key }}_metabase:
            external: true
    {% endif %}