유튜브 뮤직 쿠키 자동 갱신: 서버가 브라우저 탭처럼 10분마다 accounts.youtube.com/RotateCookies를 불러 새 __Secure-*PSIDTS·*SIDCC 값을 쿠키 파일에 그 형식 그대로 씀(collector/cookie-keeper.ts, cookie-jar.ts), 이어서 노래 검색으로 로그인 상태 확인. 만료(갱신 401/403·로그아웃 검색)는 관리자 → 수집 맨 위에 표시하고 새 파일이 들어올 때까지 갱신 멈춤(파일이 바뀌면 1분 안에 다시 확인). 원곡 찾기 YtMusic은 파일이 바뀌면 다시 읽고, 연령제한 음원 받기는 곡마다 새로 읽고 yt-dlp가 바꾼 값을 파일에 합침. compose: 쿠키 폴더를 쓰기 가능으로 연결(YT_COOKIE_PATH=/run/secrets/music_quiz/ytm_cookie.txt). 단위·관리자 API·e2e 테스트, docs 08·09·12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-29 14:44:25 +09:00
parent 8fc62458f3
commit e2a9e81c2c
18 changed files with 521 additions and 38 deletions

View File

@@ -11,12 +11,15 @@ services:
env_file: .env
environment:
TRUST_PROXY: "1"
# the cookie folder below (overrides an older YT_COOKIE_PATH in .env)
YT_COOKIE_PATH: /run/secrets/music_quiz/ytm_cookie.txt
ports:
- "${APP_PORT:-2974}:3000"
volumes:
- app-data:/data
# YouTube Music cookie for song search (collector / admin autofill, later stages). Read-only.
- ${YT_COOKIE_HOST_PATH:-/home/claude/.config/music_quiz/ytm_cookie.txt}:/run/secrets/ytm_cookie.txt:ro
# YouTube Music cookie (song search, 연령제한 음원). Writable: the server renews the cookie's session values in the file
# (collector/cookie-keeper.ts). The folder, not the file, so a cookie file replaced on the host is seen without a restart.
- ${YT_COOKIE_HOST_DIR:-/home/claude/.config/music_quiz}:/run/secrets/music_quiz
mem_limit: 1g
stop_grace_period: 15s
logging: