2023-12-24 14:36:54 -08:00
|
|
|
---
|
|
|
|
version: 2
|
|
|
|
|
|
|
|
extras:
|
|
|
|
docker: &docker
|
|
|
|
type: volume
|
|
|
|
to:
|
|
|
|
- docker-local
|
|
|
|
- docker-s3
|
|
|
|
cron: '0 * * * *'
|
|
|
|
hooks:
|
|
|
|
before:
|
|
|
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Autorestic Docker Volume ${AUTORESTIC_LOCATION} BEFORE / Host: ${HOST} / User: ${USER} / Home: ${HOME}" https://healthchecks.{{ .host.domain }}/ping/TODO_UUID/start'
|
|
|
|
failure:
|
|
|
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Autorestic Docker Volume ${AUTORESTIC_LOCATION} BEFORE / Host: ${HOST} / User: ${USER} / Home: ${HOME}" https://healthchecks.{{ .host.domain }}/ping/TODO_UUID/fail'
|
|
|
|
success:
|
|
|
|
- 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Autorestic Docker Volume ${AUTORESTIC_LOCATION} BEFORE / Host: ${HOST} / User: ${USER} / Home: ${HOME}" https://healthchecks.{{ .host.domain }}/ping/TODO_UUID'
|
|
|
|
options:
|
|
|
|
backup:
|
|
|
|
exclude:
|
|
|
|
- .venv
|
|
|
|
- node_modules
|
|
|
|
- venv
|
|
|
|
tag:
|
|
|
|
- docker
|
|
|
|
forget:
|
|
|
|
keep-hourly: 24
|
|
|
|
keep-daily: 7
|
|
|
|
keep-weekly: 12
|
|
|
|
keep-monthly: 8
|
|
|
|
keep-yearly: 1
|
|
|
|
|
|
|
|
locations:
|
|
|
|
healthchecks_config:
|
|
|
|
from: healthchecks_config
|
|
|
|
<<: *docker
|
|
|
|
healthchecks_postgres:
|
|
|
|
from: healthchecks_postgres
|
|
|
|
<<: *docker
|
|
|
|
rundeck_data:
|
|
|
|
from: rundeck_data
|
|
|
|
<<: *docker
|
|
|
|
portainer_manager_data:
|
|
|
|
from: portainer_manager_data
|
|
|
|
<<: *docker
|
|
|
|
statping_app:
|
|
|
|
from: statping_app
|
|
|
|
<<: *docker
|
|
|
|
statping_postgres:
|
|
|
|
from: statping_postgres
|
|
|
|
<<: *docker
|
|
|
|
|
|
|
|
backends:
|
|
|
|
docker-local:
|
|
|
|
type: local
|
|
|
|
path: /var/local/backups/docker
|
2023-12-24 20:31:57 -08:00
|
|
|
key: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "RESTIC_SYSTEM_PASSWORD")) }}{{ includeTemplate "secrets/RESTIC_SYSTEM_PASSWORD" | decrypt | trim }}{{ else }}{{ default "" (env "RESTIC_SYSTEM_PASSWORD") }}{{ end }}
|
2023-12-24 14:36:54 -08:00
|
|
|
docker-s3:
|
|
|
|
type: s3
|
|
|
|
path: {{ .user.cloudflare.r2 }}.r2.cloudflarestorage.com/docker
|
2023-12-24 20:31:57 -08:00
|
|
|
key: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "RESTIC_SYSTEM_PASSWORD")) }}{{ includeTemplate "secrets/RESTIC_SYSTEM_PASSWORD" | decrypt | trim }}{{ else }}{{ default "" (env "RESTIC_SYSTEM_PASSWORD") }}{{ end }}
|
2023-12-24 14:36:54 -08:00
|
|
|
env:
|
2023-12-24 20:31:57 -08:00
|
|
|
AWS_ACCESS_KEY_ID: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID")) }}{{ includeTemplate "secrets/CLOUDFLARE_R2_ID" | decrypt | trim }}{{ else }}{{ default "" (env "CLOUDFLARE_R2_ID") }}{{ end }}
|
|
|
|
AWS_SECRET_ACCESS_KEY: {{ if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET")) }}{{ includeTemplate "secrets/CLOUDFLARE_R2_SECRET" | decrypt | trim }}{{ else }}{{ default "" (env "CLOUDFLARE_R2_SECRET") }}{{ end }}
|