services: musicfetch-api: build: context: .. dockerfile: server/Dockerfile container_name: musicfetch-api restart: unless-stopped ports: - "6769:6769" environment: LIDARR_URL: "http://lidarr:8686" LIDARR_API_KEY: "${LIDARR_API_KEY}" MUSICFETCH_API_KEY: "${MUSICFETCH_API_KEY}" MUSICFETCH_ROOT: "/media/music" MUSICFETCH_PORT: "6769" # Optional: authenticated YouTube cookies to avoid bot-check ("Sign in to # confirm you're not a bot") / rate limits. To enable, set in a .env file # (see server/.env.example): # YTDLP_COOKIES_HOST=/host/path/cookies.txt # The host file is mounted read-only at /cookies.txt and used automatically. YTDLP_COOKIES: "${YTDLP_COOKIES_HOST:+/cookies.txt}" volumes: - /media/music:/media/music # Cookies bind: maps to the host cookies.txt when YTDLP_COOKIES_HOST is set, # otherwise /dev/null (harmless no-op so the container still starts). - "${YTDLP_COOKIES_HOST:-/dev/null}:/cookies.txt:ro"