version: '2' services: restic: image: restic/restic build: . container_name: restic hostname: restic restart: on-failure:3 volumes: - ${RESTIC_BACKUP_SOURCE}:/mnt/source:ro - ./data/restic:/root/restic:ro - ./data/cache:/root/.cache/restic env_file: .env entrypoint: /root/restic/entry.sh # For debugging, docker-compose run restic #entrypoint: /bin/sh