grocy: Add restic backup
This commit is contained in:
parent
af5b647daf
commit
9cf1a5e571
2 changed files with 20 additions and 3 deletions
|
|
@ -7,5 +7,8 @@ stack_grocy_puid: "{{ puid | default(1000) }}"
|
|||
stack_grocy_pgid: "{{ pgid | default(100) }}"
|
||||
stack_grocy_umask_set: "{{ umask_set | default('022') }}"
|
||||
|
||||
stack_grocy_restic_enable: true
|
||||
stack_grocy_restic_cron: 0 15 2 * * *
|
||||
|
||||
stack_grocy_env_dir: /opt/stack_grocy
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,23 @@ services:
|
|||
caddy: "{{ stack_grocy_subdomain }}"
|
||||
caddy.reverse_proxy: "{{ '{{' }}upstreams 80{{ '}}'}}"
|
||||
|
||||
{% if restic_enable is not undefined and not false and stack_grocy_restic_enable is not undefined and not false %}
|
||||
backup:
|
||||
image: mazzolino/restic
|
||||
environment:
|
||||
TZ: "{{ restic_tz }}"
|
||||
BACKUP_CRON: "{{ stack_grocy_restic_cron }}"
|
||||
RESTIC_REPOSITORY: "{{ restic_repo }}"
|
||||
RESTIC_PASSWORD: "{{ restic_pass }}"
|
||||
AWS_ACCESS_KEY_ID: "{{ restic_s3_key }}"
|
||||
AWS_SECRET_ACCESS_KEY: "{{ restic_s3_secret }}"
|
||||
RESTIC_BACKUP_ARGS: >-
|
||||
--tag grocy
|
||||
RESTIC_BACKUP_SOURCES: "/backup"
|
||||
volumes:
|
||||
- "{{ stack_grocy_env_dir }}:/backup/{{ stack_grocy_env_dir }}"
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue