-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (71 loc) · 2.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (71 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
services:
# ── PostgreSQL ──────────────────────────────────────────────
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: dnd_ai
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
# ── Ollama (local LLM) ─────────────────────────────────────
ollama:
image: ollama/ollama:latest
restart: unless-stopped
volumes:
- ollama_models:/root/.ollama
ports:
- "11434:11434"
# GPU passthrough (uncomment for NVIDIA GPU support)
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
# ── FastAPI backend ─────────────────────────────────────────
backend:
build:
context: ./backend
restart: unless-stopped
depends_on:
db:
condition: service_healthy
ollama:
condition: service_started
environment:
DATABASE_URL: postgresql+psycopg://postgres:${POSTGRES_PASSWORD:-postgres}@db:5432/dnd_ai
OLLAMA_BASE_URL: http://ollama:11434
OLLAMA_MODEL: ${OLLAMA_MODEL:-llama3.1:8b}
SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env}
CORS_ORIGINS: '["http://localhost", "http://localhost:3000"]'
ENVIRONMENT: production
DEBUG: "false"
volumes:
- vector_data:/app/data/vectors
- uploads:/app/uploads/campaigns
ports:
- "8000:8000"
# ── React frontend (Nginx) ─────────────────────────────────
frontend:
build:
context: ./frontend
restart: unless-stopped
depends_on:
- backend
ports:
- "3000:80"
volumes:
pgdata:
ollama_models:
vector_data:
uploads: