Files
Backrest/compose.yml
2026-03-14 11:52:20 -04:00

59 lines
2.1 KiB
YAML

services:
backrest:
image: garethgeorge/backrest:latest
container_name: backrest
restart: unless-stopped
networks:
- homelab-network
- traefik-network
ports:
- '9898:9898'
volumes:
- ./data:/data
- ./config:/config
- ${BACKUP_STACKS_FOLDER}:${BACKUP_STACKS_FOLDER}:ro # Backup source
- ${BACKUP_HOME_FOLDER}:${BACKUP_HOME_FOLDER}:RO # Backup Source
- ${BACKUP_FOLDER}:${BACKUP_FOLDER} # Backup destination
- ./cache:/cache
environment:
- BACKREST_DATA=/data
- BACKREST_CONFIG=/config/config.json
- TZ=${TZ}
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:9898/']
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
labels:
# Edit to define the url of this service
- ${HOST_LABEL}
- 'traefik.http.routers.backrest.rule=Host(`backrest.jasper.kelinreij.duckdns.org`)'
# Comment/Uncomment to disable/enable Authelia middleware
- 'traefik.http.routers.backrest.middlewares=authelia@docker'
# Comment/Uncomment to disable/enable Traefik routing
- 'traefik.enable=true'
# Comment/Uncomment to disable/enable watchtower automatic image updates
- 'com.centurylinklabs.watchtower.enable=true'
# Use the internal port for the load balancer
- 'traefik.http.services.backrest.loadbalancer.server.port=9898'
# All services being proxied by Traefik must be on this network
- 'traefik.docker.network=traefik-network'
# This enables https
- 'traefik.http.routers.backrest.entrypoints=websecure'
# This enables letsencrypt certificate management
- 'traefik.http.routers.backrest.tls.certresolver=letsencrypt'
# Define the category and description of this service
- 'homelab.category=utilities'
- 'homelab.description=Backup management with restic'
networks:
homelab-network:
external: true
traefik-network:
external: true
x-dockge:
urls:
- https://backrest.kelinreij.duckdns.org
- https://192.168.4.4:9898