feat(shaarli): Add backups
Add restic backup functionality for shaarli data.
This commit is contained in:
parent
af4cfc5a4b
commit
557f20d7b4
2 changed files with 21 additions and 0 deletions
|
|
@ -7,3 +7,7 @@ shaarli_use_https: true
|
|||
|
||||
# the subdomain link shaarli will be reachable under
|
||||
subdomain_alias: links
|
||||
|
||||
# should we back up the data?
|
||||
shaarli_backup_enable: true
|
||||
shaarli_backup_cron: 0 45 3 * * *
|
||||
|
|
|
|||
|
|
@ -15,6 +15,23 @@ services:
|
|||
- data:/var/www/shaarli/data
|
||||
- cache:/var/www/shaarli/cache
|
||||
|
||||
{% if backup_enable is not undefined and not false and shaarli_backup_enable is not undefined and not false %}
|
||||
backup:
|
||||
image: mazzolino/restic
|
||||
environment:
|
||||
- "TZ={{ restic_timezone }}"
|
||||
# go-cron starts w seconds
|
||||
- "BACKUP_CRON={{ shaarli_backup_cron }}"
|
||||
- "RESTIC_REPOSITORY={{ restic_repo }}"
|
||||
- "AWS_ACCESS_KEY_ID={{ restic_s3_key }}"
|
||||
- "AWS_SECRET_ACCESS_KEY={{ restic_s3_secret }}"
|
||||
- "RESTIC_PASSWORD={{ restic_pass }}"
|
||||
- "RESTIC_BACKUP_TAGS=shaarli"
|
||||
- "RESTIC_BACKUP_SOURCES=/volumes"
|
||||
volumes:
|
||||
- data:/volumes/shaarli_data:ro
|
||||
{% endif %}
|
||||
|
||||
volumes:
|
||||
data:
|
||||
cache:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue