Files
ytplayer/docker-compose.yml

53 lines
2.1 KiB
YAML

services:
ytplayer:
build: .
restart: unless-stopped
volumes:
# libsql DB file persists across container rebuilds
- ytplayer-data:/app/data
environment:
PORT: "3000"
DB_PATH: "/app/data/ytplayer.db"
APP_VERSION: "1.0.0"
# Unlocks /admin (API tokens, lyric/chapter history + restore). Set it in
# Dokploy's Environment tab — never commit it. Unset = admin disabled.
ADMIN_PASSWORD: "${ADMIN_PASSWORD:-}"
# Optional: override yt-dlp binary path if you mount a custom one
# YTDLP_PATH: "/usr/local/bin/yt-dlp"
# Server media cache (server/media-cache.js) — defaults shown.
# MEDIA_DIR: "/app/data/media" # on the ytplayer-data volume
# MEDIA_CACHE_MAX_BYTES: "10737418240" # 10 GiB, LRU eviction past this
# MEDIA_MIN_FREE_BYTES: "5368709120" # skip caching below 5 GiB free disk
# MEDIA_AUTO_MAX_SECONDS: "3600" # longest video auto-cached on play
# MEDIA_TRANSCODE: "1" # 0 disables the compression lane
# MEDIA_CODEC: "hevc" # hevc | h264
# MEDIA_CRF: "28"
# MEDIA_PRESET: "medium"
# MEDIA_THREADS: "2"
# MEDIA_OPT_MAX_SECONDS: "3600" # don't re-encode videos longer than this
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3000/api/version"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
- dokploy-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.ytplayer-http.rule=Host(`worship.hesed.sbs`)"
- "traefik.http.routers.ytplayer-http.entrypoints=web"
- "traefik.http.routers.ytplayer-http.middlewares=redirect-to-https"
- "traefik.http.routers.ytplayer-https.rule=Host(`worship.hesed.sbs`)"
- "traefik.http.routers.ytplayer-https.entrypoints=websecure"
- "traefik.http.routers.ytplayer-https.tls.certresolver=letsencrypt"
- "traefik.http.services.ytplayer-svc.loadbalancer.server.port=3000"
volumes:
ytplayer-data:
driver: local
networks:
dokploy-network:
external: true