-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
460 lines (431 loc) · 16.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
460 lines (431 loc) · 16.4 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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# =============================================================================
# ARIA — Autonomous Research & Intelligence Assistant
# H:\Training\AI_Engineering\ARIA\docker-compose.yml
#
# Services
# ─────────────────────────────────────────────────────────────────────────────
# Inherited from Langfuse_POC:
# langfuse-web :3000 LLM observability UI + API
# langfuse-worker :3030 Async trace processor
# postgres :5432 Langfuse metadata + MLflow backend
# clickhouse :8123 OLAP trace store (Langfuse v3)
# minio :9090 S3-compatible blob store
# mlflow :5000 Experiment tracking
# ollama :11434 Local LLM runtime
# open-webui :8080 Chat UI (Ollama + OpenRouter)
# litellm :4000 LLM proxy / router
#
# New for ARIA:
# redis :6379 Session state + A2A message bus
# qdrant :6333 Vector store (RAG + long-term memory)
# aria-api :8000 FastAPI orchestration entrypoint
# pipelines :9099 OpenWebUI Pipelines (ARIA chat model)\n# pipelines :9099 OpenWebUI Pipelines (ARIA chat model)
# =============================================================================
name: aria
# ── Shared env anchors ────────────────────────────────────────────────────────
x-langfuse-env: &langfuse-env
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-langfuse}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-changeme-generate-with-openssl-rand-base64-32}
SALT: ${SALT:-changeme-generate-with-openssl-rand-base64-16}
ENCRYPTION_KEY: ${ENCRYPTION_KEY:-0000000000000000000000000000000000000000000000000000000000000000}
TELEMETRY_ENABLED: "false"
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "true"
# ClickHouse
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000
CLICKHOUSE_URL: http://clickhouse:8123
CLICKHOUSE_USER: ${CLICKHOUSE_USER:-clickhouse}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-clickhouse}
CLICKHOUSE_CLUSTER_ENABLED: "false"
# Redis (shared with ARIA)
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_AUTH: ${REDIS_PASSWORD:-}
REDIS_TLS_ENABLED: "false"
# MinIO / S3
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_EVENT_UPLOAD_REGION: auto
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minio}
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-miniosecret}
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: langfuse
LANGFUSE_S3_MEDIA_UPLOAD_REGION: auto
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minio}
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-miniosecret}
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://minio:9000
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
LANGFUSE_S3_BATCH_EXPORT_BUCKET: langfuse
LANGFUSE_S3_BATCH_EXPORT_REGION: auto
LANGFUSE_S3_BATCH_EXPORT_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minio}
LANGFUSE_S3_BATCH_EXPORT_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-miniosecret}
LANGFUSE_S3_BATCH_EXPORT_ENDPOINT: http://minio:9000
LANGFUSE_S3_BATCH_EXPORT_FORCE_PATH_STYLE: "true"
# Auto-init org/project (no manual UI setup needed on first boot)
LANGFUSE_INIT_ORG_ID: aria-org
LANGFUSE_INIT_ORG_NAME: ARIA
LANGFUSE_INIT_PROJECT_ID: aria-project
LANGFUSE_INIT_PROJECT_NAME: aria
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-pk-lf-local}
LANGFUSE_INIT_PROJECT_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-sk-lf-local}
LANGFUSE_INIT_USER_EMAIL: ${LANGFUSE_INIT_USER_EMAIL:-admin@local.dev}
LANGFUSE_INIT_USER_PASSWORD: ${LANGFUSE_INIT_USER_PASSWORD:-admin}
LANGFUSE_INIT_USER_NAME: ${LANGFUSE_INIT_USER_NAME:-Admin}
services:
# ── INFRASTRUCTURE ──────────────────────────────────────────────────────────
postgres:
image: postgres:17-alpine
container_name: aria-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-langfuse}
volumes:
- postgres-data:/var/lib/postgresql/data
# Init script: create mlflow DB alongside langfuse DB
- ./init-db:/docker-entrypoint-initdb.d:ro
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-langfuse}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aria-net
clickhouse:
image: clickhouse/clickhouse-server:24.12-alpine
container_name: aria-clickhouse
restart: unless-stopped
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: ${CLICKHOUSE_USER:-clickhouse}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:-clickhouse}
volumes:
- clickhouse-data:/var/lib/clickhouse
- clickhouse-logs:/var/log/clickhouse-server
ports:
- "127.0.0.1:18123:8123"
- "127.0.0.1:19000:9000"
healthcheck:
test: ["CMD-SHELL", "clickhouse-client --user ${CLICKHOUSE_USER:-clickhouse} --password ${CLICKHOUSE_PASSWORD:-clickhouse} --query 'SELECT 1'"]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
- aria-net
minio:
image: minio/minio:latest
container_name: aria-minio
restart: unless-stopped
command: server /data --console-address ":9091"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-miniosecret}
volumes:
- minio-data:/data
ports:
- "9090:9000" # S3 API
- "9091:9091" # MinIO console UI
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aria-net
# MinIO bucket init (runs once, exits)
minio-init:
image: minio/mc:latest
container_name: aria-minio-init
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 ${MINIO_ROOT_USER:-minio} ${MINIO_ROOT_PASSWORD:-miniosecret};
mc mb --ignore-existing local/langfuse;
mc mb --ignore-existing local/mlflow;
exit 0
"
networks:
- aria-net
# Redis — shared by Langfuse v3, ARIA session state, and A2A message bus
redis:
image: redis:7-alpine
container_name: aria-redis
restart: unless-stopped
command: >
redis-server
--appendonly yes
--maxmemory 512mb
--maxmemory-policy allkeys-lru
${REDIS_PASSWORD:+--requirepass ${REDIS_PASSWORD}}
volumes:
- redis-data:/data
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- aria-net
# Qdrant — vector store for RAG and long-term agent memory
qdrant:
image: qdrant/qdrant:latest
container_name: aria-qdrant
restart: unless-stopped
volumes:
- qdrant-data:/qdrant/storage
ports:
- "6333:6333" # REST API + dashboard → http://localhost:6333/dashboard
- "127.0.0.1:6334:6334" # gRPC
healthcheck:
test: ["CMD-SHELL", "bash -c 'exec 3<>/dev/tcp/localhost/6333 && echo -e \"GET /readyz HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n\" >&3 && grep -q \"200 OK\" <&3' || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- aria-net
# ── LLM OBSERVABILITY (Langfuse v3) ─────────────────────────────────────────
langfuse-web:
image: langfuse/langfuse:3
container_name: aria-langfuse-web
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
environment:
<<: *langfuse-env
ports:
- "3000:3000" # Langfuse UI → http://localhost:3000
networks:
- aria-net
langfuse-worker:
image: langfuse/langfuse-worker:3
container_name: aria-langfuse-worker
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
environment:
<<: *langfuse-env
ports:
- "127.0.0.1:3030:3030"
networks:
- aria-net
# ── EXPERIMENT TRACKING (MLflow) ─────────────────────────────────────────────
mlflow:
image: ghcr.io/mlflow/mlflow:v2.15.1
container_name: aria-mlflow
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
minio-init:
condition: service_completed_successfully
entrypoint: ["/bin/sh", "-c"]
command:
- >
pip install --no-cache-dir psycopg2-binary &&
mlflow server
--backend-store-uri postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/mlflow
--artifacts-destination s3://mlflow
--host 0.0.0.0
--port 5000
environment:
MLFLOW_S3_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minio}
AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-miniosecret}
ports:
- "5000:5000" # MLflow UI → http://localhost:5000
networks:
- aria-net
# ── LOCAL LLM RUNTIME (Ollama) ───────────────────────────────────────────────
ollama:
image: ollama/ollama:latest
container_name: aria-ollama
restart: unless-stopped
volumes:
- ollama-data:/root/.ollama
ports:
- "11434:11434"
# Remove the deploy block if you don't have an NVIDIA GPU
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD-SHELL", "ollama list || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- aria-net
# ── LLM PROXY (LiteLLM) ──────────────────────────────────────────────────────
# Routes all agent LLM calls: OpenRouter (remote) + Ollama (local fallback)
# Manages keys, rate limits, cost tracking, and model aliases
litellm:
image: ghcr.io/berriai/litellm:main-latest
container_name: aria-litellm
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ollama:
condition: service_healthy
volumes:
- ./litellm_config.yaml:/app/config.yaml:ro
command: --config /app/config.yaml --port 4000 --detailed_debug
environment:
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-sk-aria-master}
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/litellm
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
# Forward traces to Langfuse
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-pk-lf-local}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-sk-lf-local}
LANGFUSE_HOST: http://langfuse-web:3000
ports:
- "4000:4000" # LiteLLM proxy → http://localhost:4000
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveliness')\" || exit 1"]
interval: 15s
timeout: 10s
retries: 5
start_period: 20s
networks:
- aria-net
# ── CHAT UI (Open WebUI) ──────────────────────────────────────────────────────
# Talks to LiteLLM proxy (not Ollama directly) so all calls are traced
# ── ARIA PIPELINES ────────────────────────────────────────────────────────────
# OpenWebUI Pipelines server — exposes ARIA as a chat model in OpenWebUI.
# After startup, add http://pipelines:9099 in OpenWebUI Admin → Connections.
pipelines:
image: ghcr.io/open-webui/pipelines:main
container_name: aria-pipelines
restart: unless-stopped
volumes:
- ./pipelines:/app/pipelines
environment:
PIPELINES_DIR: /app/pipelines
ARIA_BASE_URL: http://aria-api:8000
ports:
- "9099:9099" # Pipelines API → http://localhost:9099
networks:
- aria-net
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: aria-open-webui
restart: unless-stopped
depends_on:
litellm:
condition: service_healthy
pipelines:
condition: service_started
volumes:
- open-webui-data:/app/backend/data
environment:
# Point at LiteLLM so OpenRouter models appear alongside Ollama
OPENAI_API_BASE_URL: http://litellm:4000/v1
OPENAI_API_KEY: ${LITELLM_MASTER_KEY:-sk-aria-master}
# Also expose raw Ollama for model management
OLLAMA_BASE_URL: http://ollama:11434
WEBUI_SECRET_KEY: ${WEBUI_SECRET_KEY:-changeme}
ports:
- "8080:8080" # Open WebUI → http://localhost:8080
networks:
- aria-net
# ── ARIA ORCHESTRATION API ────────────────────────────────────────────────────
# FastAPI app: POST /run GET /status/{id} POST /resume/{id} GET /sessions
aria-api:
build:
context: .
dockerfile: Dockerfile
container_name: aria-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
litellm:
condition: service_healthy
langfuse-web:
condition: service_started
volumes:
- .:/app
environment:
# LLM (via LiteLLM proxy inside the stack)
OPENAI_API_BASE: http://litellm:4000/v1
OPENAI_API_KEY: ${LITELLM_MASTER_KEY:-sk-aria-master}
# Tools
TAVILY_API_KEY: ${TAVILY_API_KEY:-}
E2B_API_KEY: ${E2B_API_KEY:-}
# Memory
REDIS_URL: redis://${REDIS_PASSWORD:+:${REDIS_PASSWORD}@}redis:6379/0
QDRANT_URL: http://qdrant:6333
QDRANT_COLLECTION: ${QDRANT_COLLECTION:-aria_memory}
# Observability
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY:-pk-lf-local}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY:-sk-lf-local}
LANGFUSE_HOST: http://langfuse-web:3000
# MLflow
MLFLOW_TRACKING_URI: http://mlflow:5000
# App
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ARIA_DEFAULT_MODEL: ${ARIA_DEFAULT_MODEL:-anthropic/claude-sonnet-4-6}
ports:
- "8000:8000" # ARIA API → http://localhost:8000/docs
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
networks:
- aria-net
# ── VOLUMES ────────────────────────────────────────────────────────────────────
volumes:
postgres-data:
clickhouse-data:
clickhouse-logs:
minio-data:
redis-data:
qdrant-data:
ollama-data:
open-webui-data:
# ── NETWORK ────────────────────────────────────────────────────────────────────
networks:
aria-net:
driver: bridge