Files
TradarrV2/docker-compose.prod.yml
Blomios 1123360914 feat(laya): integrate HTTP ranking service
Add the pinned Laya HTTP ranker and production composition, configure the CPU Compose service and cache, and document operations. Cover protocol validation, generation orchestration, sanitized logging, and Compose wiring.

Refs #17

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-22 00:55:18 +01:00

113 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:v1.1.0
restart: unless-stopped
depends_on:
- byparr
environment:
BYPARR_URL: "http://byparr:8191"
expose:
- "3001"
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: unless-stopped
stop_grace_period: 5m
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:-120s}
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: tradarr-laya:v0.5.2-cpu
pull_policy: build
build:
# Official v0.5.2 annotated tag dereferenced to its immutable commit.
context: https://github.com/NandhaKishorM/laya.git#e150aa92a0d4059ac621875b39b620847cf1b88a
args:
TORCH_INDEX: cpu
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:v1.1.0
restart: unless-stopped
depends_on:
- backend
ports:
- "${FRONTEND_PORT:-80}:80"
volumes:
pgdata:
ollama_data:
laya_model_cache: