docker-compose.yml 965 B

1234567891011121314151617181920212223242526272829303132
  1. version: '3'
  2. services:
  3. borg:
  4. image: toastie89/borg
  5. build:
  6. context: ./build
  7. args:
  8. ALPINE_VER: 3.19.1
  9. BORG_VER: =1.2.7-r0
  10. container_name: borg
  11. hostname: borg
  12. volumes:
  13. - ${VOLUME_SOURCE}:/mnt/source:ro # backup source
  14. - ${VOLUME_TARGET}:/mnt/target:rw # backup target
  15. - ./data/.config/borg:/root/.config/borg # config and keyfiles
  16. - ./data/.cache/borg:/root/.cache/borg # checksums used for deduplication
  17. - ./scripts:/opt/scripts # scripts run by cron and helper
  18. environment:
  19. - TZ=${TZ}
  20. - PROM_URL=${PROM_URL}
  21. - BORG_HOSTNAME=${BORG_HOSTNAME}
  22. - BORG_PASSPHRASE=${BORG_PASSPHRASE}
  23. - BORG_REPO=${BORG_REPO}
  24. - BORG_SOURCE_PATH=${BORG_SOURCE_PATH}
  25. - BORG_RETENTION=${BORG_RETENTION}
  26. - CRON=${CRON}
  27. networks:
  28. - prometheus_pushgateway
  29. networks:
  30. prometheus_pushgateway:
  31. external: true