services:
  # syncthing
  syncthing:
    image: linuxserver/syncthing:latest
    container_name: syncthing
    profiles:
      - syncthing
    depends_on:
      - caddy
    restart: on-failure:7
    env_file:
      - ./env/syncthing.env
    environment:
      - PUID=${PUID:-1000}
      - PGID=${PGID:-1000}
      - TZ=${TZ:-Europe/Paris}
    volumes:
      - syncthing_config:/config
      - public_data:/data1
      - private_data:/data2
    networks:
      - caddy-media
    security_opt:
      - no-new-privileges:true

volumes:
  syncthing_config:
    name: syncthing_config
  public_data:
    name: public_data
  private_data:
    name: private_data

networks:
  caddy-media:
    driver: bridge
    name: caddy-media
