Files
ts6-manager/docker-compose.yml
omar bdb90854f8 fix(compose): mount ./secrets read-write so yt-dlp can save cookie jar
yt-dlp calls save_cookies() on exit and rewrites the --cookies file. A read-only
mount makes it crash with "OSError: [Errno 30] Read-only file system", which surfaced
as 500s on the app's YouTube search/download endpoints when YT_COOKIE_FILE was set.
2026-06-16 07:49:30 +03:00

69 lines
2.0 KiB
YAML

services:
backend:
# Custom backend with the baked-in YouTube fix (deno + yt-dlp EJS solver),
# built by Gitea Actions and published to the Gitea registry.
image: git.qomar.pw/omar/ts6-manager/backend:latest
container_name: ts6-backend
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=3001
- DATABASE_URL=file:/app/packages/backend/data/ts6webui.db
- JWT_SECRET=${JWT_SECRET:?Set JWT_SECRET in .env or environment}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-}
- TS_ALLOW_SELF_SIGNED=${TS_ALLOW_SELF_SIGNED:-false}
# Optional YouTube cookies. Drop the file at ./secrets/youtube-cookies.txt.
# If absent, playback still works via the deno + EJS challenge solver.
- YT_COOKIE_FILE=${YT_COOKIE_FILE:-/secrets/youtube-cookies.txt}
- JWT_ACCESS_EXPIRY=15m
- JWT_REFRESH_EXPIRY=7d
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:3000}
- MUSIC_DIR=/data/music
- SIDECAR_URL=http://ts6-sidecar:9800
- SIDECAR_BINARY_PATH=${SIDECAR_BINARY_PATH:-}
volumes:
- backend-data:/app/packages/backend/data
- music-data:/data/music
# Read-write on purpose: yt-dlp rewrites the cookie jar on exit (save_cookies),
# so a :ro mount makes it crash with "Read-only file system". The actual cookie
# file is gitignored (never committed).
- ./secrets:/secrets
ports:
- "3001:3001"
depends_on:
- sidecar
networks:
- ts6-network
sidecar:
image: clusterzx/ts6-manager:sidecar
container_name: ts6-sidecar
restart: unless-stopped
environment:
- SIDECAR_PORT=9800
ports:
- "9800:9800"
networks:
- ts6-network
frontend:
image: clusterzx/ts6-manager:frontend
container_name: ts6-frontend
restart: unless-stopped
ports:
- "3000:80"
depends_on:
- backend
networks:
- ts6-network
volumes:
backend-data:
driver: local
music-data:
driver: local
networks:
ts6-network:
driver: bridge