services:
  copyparty:
    image: copyparty/ac:latest
    container_name: copyparty
    restart: unless-stopped
    ports:
      - "{{ copyparty.port }}:3923"
    volumes:
      - /srv/dockerdata/copyparty/config/copyparty.conf:/cfg/copyparty.conf:ro
      - /srv/dockerdata/copyparty/hists:/cfg/hists
{% for volume in copyparty.volumes | default([]) %}
      - {{ volume.path }}:{{ volume.path }}
{% endfor %}
    environment:
      - TZ=Europe/Berlin
    stop_grace_period: 15s
    healthcheck:
      test: ["CMD-SHELL", "wget --spider -q 127.0.0.1:3923/?reset"]
      interval: 1m
      timeout: 2s
      retries: 5
      start_period: 15s
