Fix the YouTube cookie mount advice, and document the Firefox export - #31
Merged
Merged
Conversation
The URL-import docs said to mount a YouTube cookies file through docker-compose.override.yml. Compose reads that file only when COMPOSE_FILE is unset, and every deployment of this app sets COMPOSE_FILE for the reverse-proxy overlay, so the mount was silently ignored (reproduced with `docker compose config`). - docker-compose.cookies.yml: an opt-in overlay, named in COMPOSE_FILE like the prod one. Mounts the ./secrets directory read-only (not the file, so a refreshed file needs no restart and a missing one cannot become a directory) and defaults URL_IMPORT_COOKIES_FILE to it. - /secrets/ gitignored: a cookies file is a login. - docs/url-import.md#youtube-cookies: the full Linux procedure: a dedicated Firefox profile, finding its folder (Snap, Flatpak, XDG and legacy locations), exporting by explicit path, keeping only youtube.com lines, installing it on the server, refreshing it. Commands were run verbatim against a fake profile. A bare `--cookies-from-browser firefox` exported the most recently used profile instead, so the docs require the path. - .env.example and deployment.md point at it, and say that setting COMPOSE_FILE turns off docker-compose.override.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KYsSofkyeywy1NNPV8NtM
davior
marked this pull request as ready for review
September 28, 2026 12:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #30.
The bug
The URL-import docs said to mount a YouTube cookies file through
docker-compose.override.yml. Compose only reads that file whenCOMPOSE_FILEis unset. Every deployment of this app setsCOMPOSE_FILEfor the reverse-proxy overlay (docs/deployment.md), so the mount was silently ignored. Confirmed withdocker compose config:/app/secretsmounted?docker-compose.override.yml, withCOMPOSE_FILEset (production)COMPOSE_FILEunset (why it looked right)docker-compose.cookies.ymllisted inCOMPOSE_FILEURL_IMPORT_COOKIES_FILEdefaultedChanges
docker-compose.cookies.ymlis a new opt-in overlay, enabled by listing it inCOMPOSE_FILElike the prod one../secrets→/app/secretsas a directory, read-only, rather than the file. A single-file bind mount pins the inode, so a refreshed file written by rsync or an editor would stay invisible until the container was recreated. A missing file would also make Docker create a directory in its place.URL_IMPORT_COOKIES_FILE=${URL_IMPORT_COOKIES_FILE:-/app/secrets/youtube-cookies.txt}. An explicit.envvalue still wins, and the empty value copied from.env.examplefalls through to the default. Both verified withdocker compose config..gitignore:/secrets/. A cookies file is a login, and the server's checkout is a git clone.docs/url-import.md#youtube-cookiesreplaces the old paragraph with the full procedure, Linux only:youtube.comlines.env.exampleanddocs/deployment.mdpoint at that section, and say that settingCOMPOSE_FILEturns offdocker-compose.override.yml.No application code changes.
Verification
YoutubeDLCookieJarwith onlyyoutube.comcookies.--cookies-from-browser firefoxexported the most recently used one (the everyday profile, with unrelated site sessions). The explicit path exported the right one.git check-ignore secrets/youtube-cookies.txtmatches.pytest -q tests/test_url_import.py tests/test_imports_api.py: 64 passed. No code changed; this is a sanity check.🤖 Generated with Claude Code
https://claude.ai/code/session_017KYsSofkyeywy1NNPV8NtM
Generated by Claude Code