# Overlay: run YOUR yt-dlp — a source checkout on the host — instead of the # image's release binary. No rebuild: the swap happens at run time. # # # .env # YTDLP_SOURCE_HOST_DIR=/home/you/yt-dlp-patched # holds the yt_dlp/ package # # docker compose -f docker-compose.yml -f docker-compose.ytdlp.yml up -d # # The checkout is mounted read-only at /opt/yt-dlp-src and YTDLP_BIN points at # /usr/local/bin/yt-dlp-from-source, a wrapper baked into the image # (docker/yt-dlp-from-source.sh) that runs `python3 -m yt_dlp` from it with the # image's python and yt-dlp's optional modules. # # Every editor boot prints `yt-dlp: (override)`, and # YTDLP_AUTO_UPDATE leaves an override alone — update the checkout instead. # A zipapp built on the host (`make yt-dlp` in the checkout) works too, with no # overlay: copy it into the config volume and set YTDLP_BIN to its path there. # RUNNING_IN_DOCKER.md, "Substituting yt-dlp". services: editor: environment: YTDLP_BIN: /usr/local/bin/yt-dlp-from-source volumes: - ${YTDLP_SOURCE_HOST_DIR:?set YTDLP_SOURCE_HOST_DIR in .env to your yt-dlp checkout}:/opt/yt-dlp-src:ro