26 lines
1.1 KiB
YAML
26 lines
1.1 KiB
YAML
services:
|
|
autorestic:
|
|
image: cupcakearmy/autorestic
|
|
container_name: autorestic
|
|
hostname: autorestic-backup
|
|
# We mount the autorestic config file into the container.
|
|
# We mount the data you want to back up (E:\installers) into the container at /data/installers.
|
|
# We mount the repository location (G:\autorestic-backups) into the container at /repo/autorestic_repo.
|
|
# We use a named volume for the restic cache for persistence and performance.
|
|
volumes:
|
|
- ./config:/config
|
|
- e:/installers:/data/installers:ro
|
|
- g:/autorestic-backups:/repo/autorestic_repo
|
|
- autorestic_cache:/root/.cache/restic
|
|
# Pass secrets as environment variables.
|
|
environment:
|
|
- RESTIC_PASSWORD=YOUR_STRONG_REPOSITORY_PASSWORD
|
|
# This command will automatically run backups, checks, and prunes
|
|
# based on the cron schedules defined in your .autorestic.yml
|
|
command: >
|
|
/bin/sh -c "while true; do autorestic --config /config/.autorestic.yml cron; sleep 3600; done"
|
|
restart: unless-stopped
|
|
|
|
# Define the named volume for the cache
|
|
volumes:
|
|
autorestic_cache:
|