Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
304 lines (286 loc) · 9.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
304 lines (286 loc) · 9.15 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# Local stack. Langfuse reuses postgres (database `langfuse`) and minio
# (bucket `langfuse`). LangGraph reuses postgres (database `langgraph`)
# for checkpoints and Qdrant (collection `langgraph`) for the agent store.
# ClickHouse is Langfuse-only (traces). Redis is Langfuse queue plus
# query-embedding cache for mp serve.
# UI: Langfuse http://localhost:3100, Dagster http://localhost:3000,
# API http://localhost:8000.
# ClickHouse native port is
# not published — it would collide with MinIO on 9000. Images are Langfuse v4
# (matches Python SDK 4.x; same Postgres/ClickHouse/Redis/MinIO as v3).
# Tags are pinned for air-gap export.
x-langfuse-env: &langfuse-env
NEXTAUTH_URL: http://localhost:3100
DATABASE_URL: postgresql://material:material@postgres:5432/langfuse
SALT: material-platform-local-salt
ENCRYPTION_KEY: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
TELEMETRY_ENABLED: "false"
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "false"
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000
CLICKHOUSE_URL: http://clickhouse:8123
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_CLUSTER_ENABLED: "false"
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_AUTH: langfuse
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_EVENT_UPLOAD_REGION: auto
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: minio
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: minio123
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_EVENT_UPLOAD_PREFIX: events/
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_MEDIA_UPLOAD_REGION: auto
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: minio
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: minio123
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_MEDIA_UPLOAD_PREFIX: media/
LANGFUSE_S3_BATCH_EXPORT_ENABLED: "false"
x-dagster-env: &dagster-env
DAGSTER_HOME: /opt/dagster
INGEST_DIRECTORY: /inbox
PYTHONPATH: /app
DATABASE_URL: postgresql+psycopg://material:material@postgres:5432/material
MINIO_ENDPOINT: minio:9000
QDRANT_URL: http://qdrant:6333
REDIS_URL: redis://:langfuse@redis:6379/0
LANGGRAPH_DATABASE_URL: postgresql://material:material@postgres:5432/langgraph
LANGFUSE_HOST: http://langfuse-web:3000
WORKSPACE_ROOT: /tmp/material-platform
x-dagster-depends: &dagster-depends
postgres:
condition: service_healthy
minio:
condition: service_healthy
qdrant:
condition: service_healthy
redis:
condition: service_healthy
minio-init:
condition: service_completed_successfully
postgres-db-init:
condition: service_completed_successfully
x-langfuse-depends: &langfuse-depends
postgres:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
postgres-db-init:
condition: service_completed_successfully
minio-init:
condition: service_completed_successfully
services:
postgres:
image: postgres:16.15
environment:
POSTGRES_USER: material
POSTGRES_PASSWORD: material
POSTGRES_DB: material
TZ: UTC
PGTZ: UTC
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U material"]
interval: 5s
timeout: 5s
retries: 10
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
command: ["server", "/data", "--console-address", ":9001"]
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD-SHELL", "curl -sf http://127.0.0.1:9000/minio/health/live || mc ready local"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
qdrant:
image: qdrant/qdrant:v1.13.6
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant-data:/qdrant/storage
healthcheck:
test:
[
"CMD-SHELL",
"bash -c 'exec 3<>/dev/tcp/127.0.0.1/6333 && printf \"GET /readyz HTTP/1.0\\r\\n\\r\\n\" >&3 && cat <&3 | grep -q \"200 OK\"'",
]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7.4.11
command: ["redis-server", "--requirepass", "langfuse", "--maxmemory-policy", "noeviction"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "langfuse", "--no-auth-warning", "ping"]
interval: 5s
timeout: 5s
retries: 10
clickhouse:
image: clickhouse/clickhouse-server:25.12
user: "101:101"
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: clickhouse
CLICKHOUSE_PASSWORD: clickhouse
volumes:
- clickhouse-data:/var/lib/clickhouse
- clickhouse-logs:/var/log/clickhouse-server
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
postgres-db-init:
image: postgres:16.15
depends_on:
postgres:
condition: service_healthy
environment:
PGPASSWORD: material
entrypoint: ["bash", "-c"]
command:
- |
set -euo pipefail
for db in langfuse langgraph; do
if psql -h postgres -U material -d material -tc \
"SELECT 1 FROM pg_database WHERE datname = '$$db'" | grep -q 1; then
echo "$$db exists"
else
psql -h postgres -U material -d material -c "CREATE DATABASE $$db"
fi
done
restart: "no"
qdrant-init:
image: curlimages/curl:8.12.1
depends_on:
qdrant:
condition: service_healthy
entrypoint: ["sh", "-c"]
command:
- |
set -eu
if curl -sf "http://qdrant:6333/collections/langgraph" >/dev/null; then
echo "langgraph collection exists"
else
curl -sf -X PUT "http://qdrant:6333/collections/langgraph" \
-H "Content-Type: application/json" \
-d '{"vectors":{"dense":{"size":1024,"distance":"Cosine"}},"sparse_vectors":{"sparse":{}}}'
fi
restart: "no"
minio-init:
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
depends_on:
minio:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command:
- >
mc alias set local http://minio:9000 minio minio123
&& mc mb -p local/material
&& mc mb -p local/langfuse
restart: "no"
langfuse-web:
image: docker.langfuse.com/langfuse/langfuse:4.27.0
depends_on: *langfuse-depends
ports:
- "3100:3000"
environment:
<<: *langfuse-env
NEXTAUTH_SECRET: material-platform-local-nextauth
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://localhost:9000
LANGFUSE_S3_MEDIA_UPLOAD_INTERNAL_ENDPOINT: http://minio:9000
LANGFUSE_INIT_ORG_ID: material-platform
LANGFUSE_INIT_ORG_NAME: Material Platform
LANGFUSE_INIT_PROJECT_ID: deep-research
LANGFUSE_INIT_PROJECT_NAME: Deep Research
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: pk-lf-local
LANGFUSE_INIT_PROJECT_SECRET_KEY: sk-lf-local
LANGFUSE_INIT_USER_EMAIL: langfuse@example.com
LANGFUSE_INIT_USER_NAME: local
LANGFUSE_INIT_USER_PASSWORD: langfuselocal
langfuse-worker:
image: docker.langfuse.com/langfuse/langfuse-worker:4.27.0
depends_on: *langfuse-depends
environment:
<<: *langfuse-env
api:
image: material-platform:0.1.0
build: .
command: ["mp", "serve", "--postgres", "--host", "0.0.0.0", "--port", "8000"]
env_file: .env
environment:
<<: *dagster-env
ports:
- "8000:8000"
depends_on: *dagster-depends
dagster-web:
image: material-platform:0.1.0
build: .
command: ["dagster-webserver", "-h", "0.0.0.0", "-p", "3000", "-w", "workspace.yaml"]
env_file: .env
environment:
<<: *dagster-env
ports:
- "3000:3000"
volumes:
- ./inbox:/inbox
- ./dagster.yaml:/opt/dagster/dagster.yaml:ro
- dagster-home:/opt/dagster
depends_on: *dagster-depends
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:3000/server_info')",
]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
dagster-daemon:
image: material-platform:0.1.0
build: .
command: ["dagster-daemon", "run"]
env_file: .env
environment:
<<: *dagster-env
volumes:
- ./inbox:/inbox
- ./dagster.yaml:/opt/dagster/dagster.yaml:ro
- dagster-home:/opt/dagster
depends_on: *dagster-depends
volumes:
postgres-data:
minio-data:
qdrant-data:
redis-data:
clickhouse-data:
clickhouse-logs:
dagster-home: