Files
ytplayer/docker-compose.yml
Jonathan Sykes 847e99cd51 feat: add Traefik labels for worship.hesed.sbs via homelab Dokploy
- Join dokploy-network so homelab Traefik can discover the container
- Remove host port binding (Traefik routes directly via service discovery)
- Add HTTP→HTTPS redirect and HTTPS router with letsencrypt cert
- VPS Traefik passthrough for worship.hesed.sbs already added on server
2026-06-30 07:13:25 +08:00

39 lines
1.2 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"
# Optional: override yt-dlp binary path if you mount a custom one
# YTDLP_PATH: "/usr/local/bin/yt-dlp"
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