backup-bot-two/compose.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

---
version: "3.8"
services:
app:
image: docker:24.0.7-dind
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/lib/docker/volumes/:/var/lib/docker/volumes/"
- "/var/lib/docker/containers/:/var/lib/docker/containers/:ro"
2023-09-06 23:41:03 +00:00
- backups:/backups
environment:
- CRON_SCHEDULE
- RESTIC_REPOSITORY
- RESTIC_PASSWORD_FILE=/run/secrets/restic_password
secrets:
- restic_password
deploy:
labels:
2022-10-11 13:28:50 +00:00
- coop-cloud.${STACK_NAME}.version=0.1.0+latest
- coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-300}
2023-10-09 10:53:28 +00:00
- coop-cloud.backupbot.enabled=true
configs:
- source: entrypoint
target: /entrypoint.sh
mode: 0555
2023-09-06 23:41:03 +00:00
- source: backupbot
2023-09-07 11:10:10 +00:00
target: /usr/bin/backup
mode: 0555
entrypoint: ['/entrypoint.sh']
2023-12-19 00:16:12 +00:00
#entrypoint: ['tail', '-f','/dev/null']
2023-09-07 23:17:01 +00:00
healthcheck:
test: "pgrep crond"
interval: 30s
timeout: 10s
retries: 10
start_period: 5m
secrets:
restic_password:
external: true
name: ${STACK_NAME}_restic_password_${SECRET_RESTIC_PASSWORD_VERSION}
2023-09-06 23:41:03 +00:00
volumes:
backups:
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh
2023-09-06 23:41:03 +00:00
backupbot:
name: ${STACK_NAME}_backupbot_${BACKUPBOT_VERSION}
file: backupbot.py