47 lines
1.8 KiB
YAML
47 lines
1.8 KiB
YAML
services:
|
|
backend:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
# Server
|
|
- HOST=0.0.0.0
|
|
- PORT=3000
|
|
# Database — SQLite by default; swap for a postgres:// URL to use PostgreSQL
|
|
- DATABASE_URL=sqlite:///app/data/k-tv.db?mode=rwc
|
|
# CORS — set to your frontend origin(s), comma-separated
|
|
- CORS_ALLOWED_ORIGINS=http://localhost:3001
|
|
# Auth — CHANGE BOTH before going to production
|
|
# Generate JWT_SECRET with: openssl rand -hex 32
|
|
# Generate COOKIE_SECRET with: openssl rand -base64 64
|
|
- JWT_SECRET=change-me-generate-with-openssl-rand-hex-32
|
|
- COOKIE_SECRET=change-me-must-be-at-least-64-characters-long-for-production!!
|
|
- JWT_EXPIRY_HOURS=24
|
|
- SECURE_COOKIE=false # set to true when serving over HTTPS
|
|
- PRODUCTION=false
|
|
# Database pool
|
|
- DB_MAX_CONNECTIONS=5
|
|
- DB_MIN_CONNECTIONS=1
|
|
# Jellyfin media provider — all three are required to enable schedule generation
|
|
- JELLYFIN_BASE_URL=http://jellyfin:8096
|
|
- JELLYFIN_API_KEY=your-jellyfin-api-key-here
|
|
- JELLYFIN_USER_ID=your-jellyfin-user-id-here
|
|
volumes:
|
|
- ./data:/app/data # SQLite database + any other persistent files
|
|
restart: unless-stopped
|
|
|
|
# ── Optional: PostgreSQL ────────────────────────────────────────────────────
|
|
# Uncomment and set DATABASE_URL=postgres://ktv:password@db:5432/ktv above.
|
|
#
|
|
# db:
|
|
# image: postgres:16-alpine
|
|
# environment:
|
|
# POSTGRES_USER: ktv
|
|
# POSTGRES_PASSWORD: password
|
|
# POSTGRES_DB: ktv
|
|
# ports:
|
|
# - "5432:5432"
|
|
# volumes:
|
|
# - db_data:/var/lib/postgresql/data
|
|
# restart: unless-stopped
|