2021-11-06 17:45:39 +00:00
|
|
|
---
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
app:
|
|
|
|
image: thecoopcloud/backup-bot-two:latest
|
2021-11-09 10:37:56 +00:00
|
|
|
build: .
|
2021-11-06 17:45:39 +00:00
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
- "backups:/backups"
|
|
|
|
environment:
|
|
|
|
- RESTIC_REPO
|
|
|
|
- RESTIC_PASSWORD_FILE=/run/secrets/restic_password
|
|
|
|
- BACKUP_DEST=/backups
|
|
|
|
- SERVER_NAME
|
|
|
|
secrets:
|
|
|
|
- restic_password
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 0
|
|
|
|
labels:
|
|
|
|
- "swarm.cronjob.enable=true"
|
2021-11-09 10:37:56 +00:00
|
|
|
# Note(3wc): every 5m, testing
|
2021-11-06 17:45:39 +00:00
|
|
|
- "swarm.cronjob.schedule=*/5 * * * *"
|
2021-11-09 10:37:56 +00:00
|
|
|
# Note(3wc): blank label to be picked up by `abra recipe sync`
|
|
|
|
- coop-cloud.${STACK_NAME}.app.version=
|
2021-11-06 17:45:39 +00:00
|
|
|
restart_policy:
|
|
|
|
condition: none
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
backups:
|
2021-11-09 10:37:56 +00:00
|
|
|
|
|
|
|
secrets:
|
|
|
|
restic_password:
|
|
|
|
external: true
|
|
|
|
name: ${STACK_NAME}_restic_password_${SECRET_RESTIC_PASSWORD_VERSION}
|