mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-03-25 00:16:47 +00:00
- Add setup script (scripts/setup-local-llm.sh) for one-command Ollama setup Mac: native Metal GPU, Linux: containerized via docker-compose profiles - Add ollama-gpu and ollama-cpu docker-compose profiles for Linux - Add extra_hosts to server/hatchet-worker-llm for host.docker.internal - Pass response_format JSON schema in StructuredOutputWorkflow.extract() enabling grammar-based constrained decoding on Ollama/llama.cpp/vLLM/OpenAI - Update .env.example with Ollama as default LLM option - Add Ollama PRD and local dev setup docs
176 lines
3.9 KiB
YAML
176 lines
3.9 KiB
YAML
services:
|
|
server:
|
|
build:
|
|
context: server
|
|
ports:
|
|
- 1250:1250
|
|
volumes:
|
|
- ./server/:/app/
|
|
- /app/.venv
|
|
env_file:
|
|
- ./server/.env
|
|
environment:
|
|
ENTRYPOINT: server
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
worker:
|
|
build:
|
|
context: server
|
|
volumes:
|
|
- ./server/:/app/
|
|
- /app/.venv
|
|
env_file:
|
|
- ./server/.env
|
|
environment:
|
|
ENTRYPOINT: worker
|
|
|
|
beat:
|
|
build:
|
|
context: server
|
|
volumes:
|
|
- ./server/:/app/
|
|
- /app/.venv
|
|
env_file:
|
|
- ./server/.env
|
|
environment:
|
|
ENTRYPOINT: beat
|
|
|
|
hatchet-worker-cpu:
|
|
build:
|
|
context: server
|
|
volumes:
|
|
- ./server/:/app/
|
|
- /app/.venv
|
|
env_file:
|
|
- ./server/.env
|
|
environment:
|
|
ENTRYPOINT: hatchet-worker-cpu
|
|
depends_on:
|
|
hatchet:
|
|
condition: service_healthy
|
|
hatchet-worker-llm:
|
|
build:
|
|
context: server
|
|
volumes:
|
|
- ./server/:/app/
|
|
- /app/.venv
|
|
env_file:
|
|
- ./server/.env
|
|
environment:
|
|
ENTRYPOINT: hatchet-worker-llm
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
hatchet:
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
image: redis:7.2
|
|
ports:
|
|
- 6379:6379
|
|
web:
|
|
image: node:22-alpine
|
|
ports:
|
|
- "3000:3000"
|
|
command: sh -c "corepack enable && pnpm install && pnpm dev"
|
|
restart: unless-stopped
|
|
working_dir: /app
|
|
volumes:
|
|
- ./www:/app/
|
|
- /app/node_modules
|
|
env_file:
|
|
- ./www/.env.local
|
|
environment:
|
|
- NODE_ENV=development
|
|
|
|
postgres:
|
|
image: postgres:17
|
|
command: postgres -c 'max_connections=200'
|
|
ports:
|
|
- 5432:5432
|
|
environment:
|
|
POSTGRES_USER: reflector
|
|
POSTGRES_PASSWORD: reflector
|
|
POSTGRES_DB: reflector
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
- ./server/docker/init-hatchet-db.sql:/docker-entrypoint-initdb.d/init-hatchet-db.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d reflector -U reflector"]
|
|
interval: 10s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
hatchet:
|
|
image: ghcr.io/hatchet-dev/hatchet/hatchet-lite:latest
|
|
ports:
|
|
- "8889:8888"
|
|
- "7078:7077"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: "postgresql://reflector:reflector@postgres:5432/hatchet?sslmode=disable"
|
|
SERVER_AUTH_COOKIE_DOMAIN: localhost
|
|
SERVER_AUTH_COOKIE_INSECURE: "t"
|
|
SERVER_GRPC_BIND_ADDRESS: "0.0.0.0"
|
|
SERVER_GRPC_INSECURE: "t"
|
|
SERVER_GRPC_BROADCAST_ADDRESS: hatchet:7077
|
|
SERVER_GRPC_PORT: "7077"
|
|
SERVER_URL: http://localhost:8889
|
|
SERVER_AUTH_SET_EMAIL_VERIFIED: "t"
|
|
# SERVER_DEFAULT_ENGINE_VERSION: "V1" # default
|
|
SERVER_INTERNAL_CLIENT_INTERNAL_GRPC_BROADCAST_ADDRESS: hatchet:7077
|
|
volumes:
|
|
- ./data/hatchet-config:/config
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8888/api/live"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
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
|
|
|
|
volumes:
|
|
ollama_data:
|
|
|
|
networks:
|
|
default:
|
|
attachable: true
|