services:
  borgmatic:
    image: ghcr.io/borgmatic-collective/borgmatic:latest
    container_name: borgmatic
    restart: unless-stopped
    privileged: true
    environment:
      - PUID=99
      - PGID=100
      - TZ=America/New_York
      - BORG_PASSPHRASE=${BORG_PASSPHRASE}
    volumes:
      - /mnt/user/appdata/borgmatic/config:/etc/borgmatic.d
      - /mnt/user/appdata/borgmatic/borg_keys:/root/.config/borg
      - /mnt/user/appdata/borgmatic/state:/root/.local/state/borgmatic
      - /mnt/user/appdata/borgmatic/ssh_keys:/root/.ssh
      - /mnt/disks/borg_backup/cache:/root/.cache/borg
      - /mnt/disks/borg_backup/repo:/mnt/borg-repository
      - /mnt/user:/mnt/user:ro
      - /boot:/boot:ro
