# MeTube - YouTube downloader
# Port: 8081
# Web GUI for youtube-dl/yt-dlp
version: "3.8"

services:
  youtube_downloader:
    container_name: youtube_downloader
    image: tzahi12345/youtubedl-material:nightly
    mem_limit: 6g
    cpu_shares: 768

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:17442/"]
      interval: 30s
      timeout: 5s
      retries: 3

    security_opt:
      - no-new-privileges:true

    restart: on-failure:5

    environment:
      - PUID=1029
      - PGID=100
      - ytdl_default_downloader=yt-dlp
      - ytdl_use_local_db=true
      - ytdl_port=17442
      - write_ytdl_config=true

    ports:
      - "8084:17442"

    volumes:
      - /volume2/metadata/docker/youtubedl/appdata:/app/appdata:rw
      - /volume2/metadata/docker/youtubedl/audio:/app/audio:rw
      - /volume2/metadata/docker/youtubedl/subscriptions:/app/subscriptions:rw
      - /volume2/metadata/docker/youtubedl/users:/app/users:rw
      - /volume2/metadata/docker/youtubedl/video:/app/video:rw
