version: "2.1"
services:
  duplicati:
    image: lscr.io/linuxserver/duplicati:latest
    container_name: duplicati
    networks:
      - traefik
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      # - CLI_ARGS= #optional
    volumes:
      - /srv/duplicati/config:/config
      - /srv/duplicati/backups:/backups
      - /srv/duplicati/source:/source
    ports:
      - 8200:8200
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.duplo.tls=true"
      - "traefik.http.routers.duplo.entrypoints=websecure"
      - "traefik.http.routers.duplo.rule=Host(`duplo.$DOMAIN_NAME`)"
      - "traefik.http.routers.duplo.tls.certresolver=letsencr"
      - "traefik.http.services.duplo.loadbalancer.server.port=8200"
networks:
  traefik:
    external: true
