Files
TradarrV2/docker-compose.prod.yml

105 lines
3.3 KiB
YAML

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-tradarr}
POSTGRES_USER: ${POSTGRES_USER:-tradarr}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-tradarr}"]
interval: 10s
timeout: 5s
retries: 5
byparr:
image: ghcr.io/thephaseless/byparr:latest
restart: unless-stopped
expose:
- "8191"
scraper:
image: gitea.anthonybouteiller.ovh/blomios/tradarr-scraper:e46108fecc6f076a3d5d8bf4e7d1e7539ea3b37f
restart: unless-stopped
depends_on:
- byparr
environment:
BYPARR_URL: "http://byparr:8191"
expose:
- "3001"
backend:
stop_grace_period: 5m
image: gitea.anthonybouteiller.ovh/blomios/tradarr-backend:e46108fecc6f076a3d5d8bf4e7d1e7539ea3b37f
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
scraper:
condition: service_started
laya:
condition: service_healthy
environment:
DATABASE_URL: "host=postgres port=5432 user=${POSTGRES_USER:-tradarr} password=${POSTGRES_PASSWORD} dbname=${POSTGRES_DB:-tradarr} sslmode=disable"
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:?ENCRYPTION_KEY must be 32 bytes hex}
PORT: "8080"
SCRAPER_URL: "http://scraper:3001"
LAYA_URL: "http://laya:8000"
LAYA_TIMEOUT: ${LAYA_TIMEOUT:-5m}
LAYA_API_KEY: ${LAYA_API_KEY:-}
OPENFIGI_API_KEY: ${OPENFIGI_API_KEY:-}
OPENFIGI_TIMEOUT: ${OPENFIGI_TIMEOUT:-5s}
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@tradarr.local}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-changeme}
volumes:
- /home/anthony/.claude:/root/.claude
expose:
- "8080"
laya:
image: gitea.anthonybouteiller.ovh/blomios/tradarr-laya:e46108fecc6f076a3d5d8bf4e7d1e7539ea3b37f
command: ["laya-serve"]
restart: unless-stopped
environment:
LAYA_THREADS: ${LAYA_THREADS:-4}
LAYA_DEVICE: "cpu"
LAYA_MODELS: "multilingual"
LAYA_PRELOAD: "1"
LAYA_REVISION: "reviewed"
LAYA_JEV_STRICT: "0"
LAYA_API_KEY: ${LAYA_API_KEY:-}
HF_HOME: "/home/laya/.cache/huggingface"
volumes:
- laya_model_cache:/home/laya/.cache/huggingface
expose:
- "8000"
healthcheck:
test: ["CMD", "python", "-c", "import json,os,urllib.request; k=os.environ.get('LAYA_API_KEY',''); r=urllib.request.Request('http://127.0.0.1:8000/health',headers={'Authorization':'Bearer '+k} if k else {}); d=json.load(urllib.request.urlopen(r,timeout=5)); assert d.get('status')=='ok' and 'multilingual' in d.get('loaded',[]) and d.get('device')=='cpu'"]
interval: 15s
timeout: 10s
retries: 5
start_period: 10m
ollama:
profiles: ["ollama"]
image: ollama/ollama
restart: unless-stopped
volumes:
- ollama_data:/root/.ollama
frontend:
image: gitea.anthonybouteiller.ovh/blomios/tradarr-frontend:e46108fecc6f076a3d5d8bf4e7d1e7539ea3b37f
restart: unless-stopped
depends_on:
- backend
ports:
- "${FRONTEND_PORT:-80}:80"
volumes:
pgdata:
ollama_data:
laya_model_cache: