Use docker_service ansible command
This commit is contained in:
parent
6d2fbdbbb6
commit
9ae295896f
|
@ -1,18 +1,14 @@
|
|||
---
|
||||
|
||||
- name: restic network
|
||||
docker_network:
|
||||
name: restic
|
||||
|
||||
- name: restic container
|
||||
docker_container:
|
||||
name: restic-backup
|
||||
- docker_service:
|
||||
project_name: restic_backup
|
||||
pull: yes
|
||||
definition:
|
||||
version: '3.6'
|
||||
services:
|
||||
restic-backup:
|
||||
image: mazzolino/restic
|
||||
state: started
|
||||
restart_policy: always
|
||||
networks:
|
||||
- name: restic
|
||||
env:
|
||||
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"
|
||||
|
@ -30,3 +26,12 @@
|
|||
TZ: Europe/Copenhagen
|
||||
volumes:
|
||||
- /docker-volumes:/mnt/volumes:ro
|
||||
|
||||
restic-prune:
|
||||
image: "mazzolino/restic"
|
||||
environment:
|
||||
RUN_ON_STARTUP: "true"
|
||||
PRUNE_CRON: "0 0 4 * * *"
|
||||
RESTIC_REPOSITORY: "rest:https://datacoop:{{ restic_secrets.user_secret }}@restic.graffen.io/datacoop-hevonen"
|
||||
RESTIC_PASSWORD: "{{ restic_secrets.encryption_secret }}"
|
||||
TZ: Europe/copenhagen
|
||||
|
|
Loading…
Reference in a new issue