diff --git a/roles/traefik/templates/docker-compose.yml.j2 b/roles/traefik/templates/docker-compose.yml.j2 index 7a128d6..dfa3212 100644 --- a/roles/traefik/templates/docker-compose.yml.j2 +++ b/roles/traefik/templates/docker-compose.yml.j2 @@ -115,6 +115,33 @@ services: volumes: - ./config/dynamic_conf.yaml:/usr/local/apache2/htdocs/dynamic_conf.yaml + # BACKUP + backup_prometheus: + image: offen/docker-volume-backup:latest + restart: always + environment: + BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}" + BACKUP_FILENAME: "{{ server.backup.filename_date_format }}-prometheus.tar.gz" + BACKUP_LATEST_SYMLINK: prometheus.latest.tar.gz + BACKUP_EXCLUDE_REGEXP: "\\.log$$" + BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}" + volumes: + - prometheus:/backup:ro + - {{ server.backup.folder }}/traefik:/archive + + backup_grafana: + image: offen/docker-volume-backup:latest + restart: always + environment: + BACKUP_CRON_EXPRESSION: "{{ server.backup.cron_expression }}" + BACKUP_FILENAME: "{{ server.backup.filename_date_format }}-grafana.tar.gz" + BACKUP_LATEST_SYMLINK: grafana.latest.tar.gz + BACKUP_EXCLUDE_REGEXP: "\\.log$$" + BACKUP_RETENTION_DAYS: "{{ server.backup.retention_days }}" + volumes: + - grafana:/backup:ro + - {{ server.backup.folder }}/traefik:/archive + networks: providers: internal: