mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-03-21 22:56:47 +00:00
* feat: standalone frontend uses production build instead of dev server Override web service in docker-compose.standalone.yml to build from www/Dockerfile (multi-stage: deps → build → standalone runner) instead of running pnpm dev with bind-mounted source. * chore: move standalone compose TODO to Huly issue RFFR-46 * fix: add required env vars for standalone production frontend The standalone web service (node server.js) has no bind-mounted .env files and the base env_file (.env.local) has API_URL commented out. Next.js standalone server can't auto-load .env files without them on disk, so all required vars must be explicit in the compose override. --------- Co-authored-by: Igor Loskutov <igor.loskutoff@gmail.com>
145 lines
3.8 KiB
YAML
145 lines
3.8 KiB
YAML
# Standalone services for fully local deployment (no external dependencies).
|
|
# Usage: docker compose -f docker-compose.yml -f docker-compose.standalone.yml up -d
|
|
#
|
|
# On Linux with NVIDIA GPU, also pass: --profile ollama-gpu
|
|
# On Linux without GPU: --profile ollama-cpu
|
|
# On Mac: Ollama runs natively (Metal GPU) — no profile needed, services here unused.
|
|
|
|
services:
|
|
garage:
|
|
image: dxflrs/garage:v1.1.0
|
|
ports:
|
|
- "3900:3900" # S3 API
|
|
- "3903:3903" # Admin API
|
|
volumes:
|
|
- garage_data:/var/lib/garage/data
|
|
- garage_meta:/var/lib/garage/meta
|
|
- ./data/garage.toml:/etc/garage.toml:ro
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "/garage", "stats"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
profiles: ["ollama-gpu"]
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama_data:/root/.ollama
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
ollama-cpu:
|
|
image: ollama/ollama:latest
|
|
profiles: ["ollama-cpu"]
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama_data:/root/.ollama
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Override server/worker/beat to use self-hosted GPU service for transcription+diarization.
|
|
# compose `environment:` overrides values from `env_file:` — no need to edit server/.env.
|
|
server:
|
|
environment:
|
|
TRANSCRIPT_BACKEND: modal
|
|
TRANSCRIPT_URL: http://localhost:8100
|
|
TRANSCRIPT_MODAL_API_KEY: local
|
|
DIARIZATION_BACKEND: modal
|
|
DIARIZATION_URL: http://localhost:8100
|
|
|
|
worker:
|
|
environment:
|
|
TRANSCRIPT_BACKEND: modal
|
|
TRANSCRIPT_URL: http://cpu:8000
|
|
TRANSCRIPT_MODAL_API_KEY: local
|
|
DIARIZATION_BACKEND: modal
|
|
DIARIZATION_URL: http://cpu:8000
|
|
|
|
web:
|
|
image: reflector-frontend-standalone
|
|
build:
|
|
context: ./www
|
|
command: ["node", "server.js"]
|
|
volumes: !reset []
|
|
environment:
|
|
NODE_ENV: production
|
|
# Browser-facing URLs (host-accessible ports)
|
|
API_URL: http://localhost:1250
|
|
WEBSOCKET_URL: ws://localhost:1250
|
|
SITE_URL: http://localhost:3000
|
|
# Server-side URLs (docker-network internal)
|
|
SERVER_API_URL: http://server:1250
|
|
KV_URL: redis://redis:6379
|
|
KV_USE_TLS: "false"
|
|
# Standalone: no external auth provider
|
|
FEATURE_REQUIRE_LOGIN: "false"
|
|
NEXTAUTH_URL: http://localhost:3000
|
|
NEXTAUTH_SECRET: standalone-local-secret
|
|
# Nullify partial auth vars inherited from base env_file
|
|
AUTHENTIK_ISSUER: ""
|
|
AUTHENTIK_REFRESH_TOKEN_URL: ""
|
|
|
|
cpu:
|
|
build:
|
|
context: ./gpu/self_hosted
|
|
dockerfile: Dockerfile.cpu
|
|
ports:
|
|
- "8100:8000"
|
|
volumes:
|
|
- gpu_cache:/root/.cache
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 120s
|
|
|
|
gpu-nvidia:
|
|
build:
|
|
context: ./gpu/self_hosted
|
|
profiles: ["gpu-nvidia"]
|
|
volumes:
|
|
- gpu_cache:/root/.cache
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 120s
|
|
|
|
volumes:
|
|
garage_data:
|
|
garage_meta:
|
|
ollama_data:
|
|
gpu_cache:
|