forked from data.coop/ansible
Use docker_service ansible command
This commit is contained in:
parent
6d2fbdbbb6
commit
9ae295896f
|
@ -1,32 +1,37 @@
|
||||||
---
|
---
|
||||||
|
- docker_service:
|
||||||
|
project_name: restic_backup
|
||||||
|
pull: yes
|
||||||
|
definition:
|
||||||
|
version: '3.6'
|
||||||
|
services:
|
||||||
|
restic-backup:
|
||||||
|
image: mazzolino/restic
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
RUN_ON_STARTUP: "true"
|
||||||
|
BACKUP_CRON: "0 30 3 * * *"
|
||||||
|
RESTIC_REPOSITORY: "rest:https://datacoop:{{ restic_secrets.user_secret }}@restic.graffen.io/datacoop-hevonen"
|
||||||
|
RESTIC_PASSWORD: "{{ restic_secrets.encryption_secret }}"
|
||||||
|
RESTIC_BACKUP_SOURCES: "/mnt/volumes"
|
||||||
|
RESTIC_BACKUP_ARGS: >-
|
||||||
|
--tag datacoop-volumes
|
||||||
|
--exclude='*.tmp'
|
||||||
|
--verbose
|
||||||
|
RESTIC_FORGET_ARGS: >-
|
||||||
|
--keep-last 10
|
||||||
|
--keep-daily 7
|
||||||
|
--keep-weekly 5
|
||||||
|
--keep-monthly 12
|
||||||
|
TZ: Europe/Copenhagen
|
||||||
|
volumes:
|
||||||
|
- /docker-volumes:/mnt/volumes:ro
|
||||||
|
|
||||||
- name: restic network
|
restic-prune:
|
||||||
docker_network:
|
image: "mazzolino/restic"
|
||||||
name: restic
|
environment:
|
||||||
|
RUN_ON_STARTUP: "true"
|
||||||
- name: restic container
|
PRUNE_CRON: "0 0 4 * * *"
|
||||||
docker_container:
|
RESTIC_REPOSITORY: "rest:https://datacoop:{{ restic_secrets.user_secret }}@restic.graffen.io/datacoop-hevonen"
|
||||||
name: restic-backup
|
RESTIC_PASSWORD: "{{ restic_secrets.encryption_secret }}"
|
||||||
image: mazzolino/restic
|
TZ: Europe/copenhagen
|
||||||
state: started
|
|
||||||
restart_policy: always
|
|
||||||
networks:
|
|
||||||
- name: restic
|
|
||||||
env:
|
|
||||||
RUN_ON_STARTUP: "true"
|
|
||||||
BACKUP_CRON: "0 30 3 * * *"
|
|
||||||
RESTIC_REPOSITORY: "rest:https://datacoop:{{ restic_secrets.user_secret }}@restic.graffen.io/datacoop-hevonen"
|
|
||||||
RESTIC_PASSWORD: "{{ restic_secrets.encryption_secret }}"
|
|
||||||
RESTIC_BACKUP_SOURCES: "/mnt/volumes"
|
|
||||||
RESTIC_BACKUP_ARGS: >-
|
|
||||||
--tag datacoop-volumes
|
|
||||||
--exclude='*.tmp'
|
|
||||||
--verbose
|
|
||||||
RESTIC_FORGET_ARGS: >-
|
|
||||||
--keep-last 10
|
|
||||||
--keep-daily 7
|
|
||||||
--keep-weekly 5
|
|
||||||
--keep-monthly 12
|
|
||||||
TZ: Europe/Copenhagen
|
|
||||||
volumes:
|
|
||||||
- /docker-volumes:/mnt/volumes:ro
|
|
||||||
|
|
Loading…
Reference in a new issue