added backups to gotosocial

This commit is contained in:
Phil 2024-09-30 16:08:21 -06:00
parent 116f415193
commit 4fc8f310be
2 changed files with 17 additions and 2 deletions

View File

@ -4,6 +4,7 @@
state: directory
loop:
- /opt/stacks/gotosocial
- /opt/stacks/gotosocial/backup
- name: Template out the compose file
ansible.builtin.template:

View File

@ -1,5 +1,3 @@
version: "3.3"
services:
gotosocial:
image: superseriousbusiness/gotosocial:0.16.0
@ -25,6 +23,22 @@ services:
volumes:
- gotosocial:/gotosocial/storage
restart: "always"
labels:
- docker-volume-backup.stop-during-backup=true
backup:
image: offen/docker-volume-backup:v2
restart: always
environment:
BACKUP_FILENAME: backup-%Y-%m-%dT%H-%M-%S.tar.gz
BACKUP_LATEST_SYMLINK: backup-latest.tar.gz
BACKUP_CRON_EXPRESSION: "0 9 * * *"
BACKUP_PRUNING_PREFIX: backup-
BACKUP_RETENTION_DAYS: 1
volumes:
- gotosocial:/backup/my-app-backup:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./backup:/archive
volumes:
gotosocial: