-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (122 loc) · 3.45 KB
/
Copy pathdocker-compose.yml
File metadata and controls
130 lines (122 loc) · 3.45 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: spectrarag
services:
qdrant:
image: qdrant/qdrant:v1.12.4
container_name: rag-qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_storage:/qdrant/storage
healthcheck:
test: ["CMD", "bash", "-c", "</dev/tcp/localhost/6333"]
interval: 5s
timeout: 3s
retries: 10
postgres:
image: postgres:16
container_name: rag-postgres
environment:
POSTGRES_USER: rag
POSTGRES_PASSWORD: rag
POSTGRES_DB: rag
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rag -d rag"]
interval: 5s
timeout: 3s
retries: 10
langfuse-db:
image: postgres:16
container_name: rag-langfuse-db
environment:
POSTGRES_USER: langfuse
POSTGRES_PASSWORD: langfuse
POSTGRES_DB: langfuse
volumes:
- langfuse_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U langfuse -d langfuse"]
interval: 5s
timeout: 3s
retries: 10
langfuse:
image: langfuse/langfuse:2
container_name: rag-langfuse
depends_on:
langfuse-db:
condition: service_healthy
environment:
DATABASE_URL: postgresql://langfuse:langfuse@langfuse-db:5432/langfuse
NEXTAUTH_SECRET: replace-me-with-32-chars-min-aaaaaa
SALT: replace-me-with-32-chars-min-bbbbbb
NEXTAUTH_URL: http://localhost:3000
TELEMETRY_ENABLED: "false"
LANGFUSE_INIT_ORG_ID: local
LANGFUSE_INIT_PROJECT_ID: rag
ports:
- "3000:3000"
ollama:
image: ollama/ollama:latest
container_name: rag-ollama
ports:
- "11434:11434"
volumes:
- ollama_models:/root/.ollama
# No hard GPU reservation, so `docker compose up -d qdrant ollama` works on any box; run Ollama natively for GPU embeddings.
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 5s
retries: 6
jaeger:
image: jaegertracing/all-in-one:1.62.0
container_name: rag-jaeger
environment:
COLLECTOR_OTLP_ENABLED: "true"
ports:
- "16686:16686" # UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:16686 || exit 1"]
interval: 10s
timeout: 5s
retries: 6
api:
build:
context: .
dockerfile: Dockerfile
image: rag-api:dev
container_name: rag-api
depends_on:
qdrant:
condition: service_healthy
postgres:
condition: service_healthy
jaeger:
condition: service_healthy
environment:
RAG_ENV: dev
RAG_LOG_LEVEL: INFO
RAG_QDRANT_URL: http://qdrant:6333
RAG_OLLAMA_BASE_URL: http://ollama:11434
RAG_POSTGRES_DSN: postgresql+psycopg://rag:rag@postgres:5432/rag
RAG_LANGFUSE_HOST: http://langfuse:3000
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
OTEL_SERVICE_NAME: rag-api-dev
# Optional, picked up from the host shell. When set, the server wires the
# LLMQueryClassifier. Without it, routing falls back to the regex, which
# misses synonyms like "graph", "image", or "bottom panel of...".
RAG_OPENROUTER_API_KEY: ${RAG_OPENROUTER_API_KEY:-}
# SENTRY_DSN intentionally unset; sentry stays in no-op mode locally.
ports:
- "8000:8000"
volumes:
qdrant_storage:
postgres_data:
langfuse_data:
ollama_models: