Give the bot yt-dlp and a YouTube music mount

watch can now fetch songs MusicBrainz lacks, which needs ffmpeg and yt-dlp in
the Red image and a writable view of the shared music library. The folder sits
in the MediaOverflow library Jellyfin already indexes as /arrmedia.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
Ziad Arafat committed 2026-11-25 16:10:58 -07:00
1 parent 9ddad41a1d
commit 29dfd5c51c
2 files changed
+14

No files matched your search

+8
View File
@@ -11,6 +11,8 @@ FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
ARG IMAGEMAGICK_VERSION="8:6.9.11.60+dfsg-1.6+deb12u*"
ARG DEJAVU_VERSION="2.37-6"
ARG NOTO_EMOJI_VERSION="2.042-0+deb12u*"
# watch's YouTube fallback extracts audio with yt-dlp, which needs ffmpeg.
ARG FFMPEG_VERSION="7:5.1.*"
# deb.debian.org is Fastly, which the home network reaches through a congested
# path (NMSU -> CENIC -> Fastly: ~125 ms and ~60 KB/s, 2026-11-10) while other
# mirrors give 3-7 MB/s. Leaseweb has no debian-security; OCF Berkeley does.
@@ -29,6 +31,7 @@ RUN sed -i \
"libmagickcore-6.q16-6-extra=${IMAGEMAGICK_VERSION}" \
"fonts-dejavu-core=${DEJAVU_VERSION}" \
"fonts-noto-color-emoji=${NOTO_EMOJI_VERSION}" \
"ffmpeg=${FFMPEG_VERSION}" \
&& rm -rf /var/lib/apt/lists/*
ENV UV_COMPILE_BYTECODE=1 \
@@ -45,6 +48,11 @@ COPY cogs ./cogs
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev
# watch's YouTube fallback runs this from the venv (on PATH). yt-dlp breaks
# when YouTube changes, so rebuild the image to pick up a current release.
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --python /app/.venv/bin/python yt-dlp
# Import dogebot.logfilter at interpreter startup, before Red sets up logging
RUN echo "import dogebot.logfilter" \
> /app/.venv/lib/python3.11/site-packages/zz-dogebot-logfilter.pth
+6
View File
@@ -9,6 +9,10 @@ ContainerName=dogebot-red
Image=localhost/dogebot-red:latest
Network=dogebot.network
Volume=dogebot-red.volume:/data
# watch's YouTube fallback writes audio for songs MusicBrainz lacks. Jellyfin
# already indexes this shared library at /arrmedia/Music, and Lidarr has the
# same Music root, so the file joins the playlist like any other track.
Volume="/mnt/MediaOverflow/arr/library/Music/YouTube Imports:/music/YouTube Imports:z"
Environment=PGHOST=dogebot-postgres PGPORT=5432 PGUSER=dogebot PGDATABASE=dogebot
Environment=LAVALINK_HOST=dogebot-lavalink LAVALINK_PORT=2333
Environment=RED_PREFIX=d!
@@ -17,6 +21,8 @@ Environment=RED_CO_OWNERS
# media-preload (watch cog). host.containers.internal is the host; its LAN IP
# would point back at this container on a rootless network.
Environment=PRELOAD_API_URL=http://host.containers.internal:8125
Environment="PLAYLIST_YOUTUBE_DIR=/music/YouTube Imports"
Environment="PLAYLIST_YOUTUBE_JELLYFIN_DIR=/arrmedia/Music/YouTube Imports"
# doge_alignment's `alignment guess`: yveltal's own Ollama (a system service,
# not part of dogebot), Qwen3.5-9B with thinking off
Environment=ALIGNMENT_MODEL_URL=http://host.containers.internal:11434