-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcompose.yaml
More file actions
459 lines (444 loc) · 12.7 KB
/
compose.yaml
File metadata and controls
459 lines (444 loc) · 12.7 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
services:
# Robosystems API
api:
container_name: robosystems-api
image: ${ROBOSYSTEMS_IMAGE:-robosystems-local}
pull_policy: ${ROBOSYSTEMS_PULL_POLICY:-never}
build:
context: .
dockerfile: Dockerfile
command: /app/bin/entrypoint.sh
environment:
- DOCKER_PROFILE=api
env_file:
- .env
ports:
- "8000:8000"
volumes:
- ./robosystems:/app/robosystems
healthcheck:
test: ["CMD", "curl", "-f", "http://robosystems-api:8000/v1/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: always
deploy:
resources:
limits:
memory: 1g
cpus: "1"
reservations:
memory: 512m
cpus: "0.5"
profiles: ["api", "robosystems", "all"]
# Graph API - Default LadybugDB Backend
graph-api:
container_name: robosystems-graph-api
image: ${ROBOSYSTEMS_IMAGE:-robosystems-local}
pull_policy: ${ROBOSYSTEMS_PULL_POLICY:-never}
build:
context: .
dockerfile: Dockerfile
command: /app/bin/entrypoint.sh
environment:
- DOCKER_PROFILE=ladybug-writer
- GRAPH_BACKEND_TYPE=ladybug
- LBUG_PORT=8001
- LBUG_DATABASE_PATH=/app/data/lbug-dbs
- LBUG_NODE_TYPE=writer
- CLUSTER_TIER=ladybug-standard
- LBUG_DATABASES_PER_INSTANCE=${LBUG_DATABASES_PER_INSTANCE:-50}
env_file:
- .env
ports:
- "8001:8001"
volumes:
- ./robosystems:/app/robosystems
- ./data/lbug-dbs:/app/data/lbug-dbs
- ./data/staging:/app/data/staging
- ./data/artifacts:/app/data/artifacts
- ./data/lance:/app/data/lance
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: always
deploy:
resources:
limits:
memory: 2g
cpus: "1.5"
reservations:
memory: 1g
cpus: "1"
profiles: ["graph-api", "lbug", "robosystems", "all"]
# Dagster Webserver - Orchestration UI
dagster-webserver:
container_name: robosystems-dagster-webserver
image: ${ROBOSYSTEMS_IMAGE:-robosystems-local}
pull_policy: ${ROBOSYSTEMS_PULL_POLICY:-never}
build:
context: .
dockerfile: Dockerfile
command: /app/bin/entrypoint.sh
environment:
- DOCKER_PROFILE=dagster
env_file:
- .env
ports:
- "8002:8002"
volumes:
- ./robosystems:/app/robosystems
- ./dagster_home:/app/dagster_home
- ./data/staging:/app/data/staging
- ./data/artifacts:/app/data/artifacts
depends_on:
pg:
condition: service_healthy
# Runs dagster job execute locally (SEC processing, materialization, etc.)
# Needs headroom for fastembed model + DuckDB + XBRL processing
restart: always
deploy:
resources:
limits:
memory: 8g
cpus: "4"
reservations:
memory: 1g
cpus: "2"
profiles: ["dagster", "robosystems", "all"]
# Dagster Daemon - Schedules, Sensors, and Run Coordination
dagster-daemon:
container_name: robosystems-dagster-daemon
image: ${ROBOSYSTEMS_IMAGE:-robosystems-local}
pull_policy: ${ROBOSYSTEMS_PULL_POLICY:-never}
build:
context: .
dockerfile: Dockerfile
command: /app/bin/entrypoint.sh
environment:
- DOCKER_PROFILE=dagster-daemon
- RUN_MIGRATIONS=true
env_file:
- .env
volumes:
- ./robosystems:/app/robosystems
- ./dagster_home:/app/dagster_home
- ./data/staging:/app/data/staging
- ./data/artifacts:/app/data/artifacts
depends_on:
pg:
condition: service_healthy
restart: always
deploy:
resources:
limits:
memory: 4g
cpus: "2"
reservations:
memory: 512m
cpus: "0.5"
profiles: ["dagster", "robosystems", "all"]
# Background Task Worker
worker:
container_name: robosystems-worker
image: ${ROBOSYSTEMS_IMAGE:-robosystems-local}
pull_policy: ${ROBOSYSTEMS_PULL_POLICY:-never}
build:
context: .
dockerfile: Dockerfile
command: /app/bin/entrypoint.sh
environment:
- DOCKER_PROFILE=worker
env_file:
- .env
volumes:
- ./robosystems:/app/robosystems
depends_on:
valkey:
condition: service_healthy
pg:
condition: service_healthy
restart: always
deploy:
resources:
limits:
memory: 1g
cpus: "1"
reservations:
memory: 512m
cpus: "0.5"
profiles: ["worker", "robosystems", "all"]
# Postgres - Database for RoboSystems
pg:
container_name: robosystems-pg
image: postgres:16
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=robosystems
env_file:
- .env
ports:
- 5432:5432
volumes:
- ./data/postgres/data:/var/lib/postgresql/data
- ./bin/setup/postgres-init.sh:/docker-entrypoint-initdb.d/init-db.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 1s
timeout: 5s
retries: 10
restart: always
deploy:
resources:
limits:
memory: 1g
cpus: "1"
reservations:
memory: 512m
cpus: "0.5"
profiles: ["pg", "robosystems", "all"]
# Valkey - Cache for RoboSystems
valkey:
container_name: robosystems-valkey
image: valkey/valkey:8.1-alpine
ports:
- 6379:6379
volumes:
- ./data/valkey:/data
command: valkey-server
--appendonly yes
--maxmemory 512mb
--maxmemory-policy allkeys-lru
--requirepass ${VALKEY_AUTH_TOKEN:-valkey}
env_file:
- .env
healthcheck:
test: ["CMD", "valkey-cli", "-a", "${VALKEY_AUTH_TOKEN:-valkey}", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: always
deploy:
resources:
limits:
memory: 768m
cpus: "0.5"
reservations:
memory: 512m
cpus: "0.25"
profiles: ["valkey", "robosystems", "all"]
# LocalStack - AWS services for RoboSystems
localstack:
container_name: robosystems-localstack
image: localstack/localstack:3.0
ports:
- "4566:4566"
environment:
# LocalStack configuration
- SERVICES=s3,secretsmanager,iam,dynamodb
- DEBUG=1
- DATA_DIR=/var/lib/localstack
- PERSISTENCE=1
# S3 configuration
- S3_SKIP_SIGNATURE_VALIDATION=1
- S3_SKIP_KMS_KEY_VALIDATION=1
# AWS credentials (dummy values for LocalStack)
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_DEFAULT_REGION=us-east-1
volumes:
- "./data/localstack:/var/lib/localstack"
- "./bin/setup/localstack-init.sh:/etc/localstack/init/ready.d/init.sh"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 10s
timeout: 5s
retries: 5
restart: always
deploy:
resources:
limits:
memory: 2g
cpus: "1"
reservations:
memory: 1g
cpus: "0.5"
profiles: ["localstack", "robosystems", "all"]
# OpenSearch - Full-text search for filing narratives
opensearch:
container_name: robosystems-opensearch
image: opensearchproject/opensearch:2
environment:
- discovery.type=single-node
- DISABLE_SECURITY_PLUGIN=true
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- "9200:9200"
volumes:
- ./data/opensearch:/usr/share/opensearch/data
healthcheck:
test:
[
"CMD-SHELL",
"curl -sf http://localhost:9200/_cluster/health || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: always
deploy:
resources:
limits:
memory: 1g
cpus: "1"
reservations:
memory: 512m
cpus: "0.5"
profiles: ["opensearch", "robosystems", "all"]
# OpenTelemetry Collector - Metrics and Tracing
otel-collector:
image: otel/opentelemetry-collector-contrib:0.106.0
container_name: robosystems-otel-collector
command: ["--config=/etc/otel/config.yaml"]
volumes:
- ./robosystems/middleware/otel/config/otel-collector-config.yaml:/etc/otel/config.yaml
ports:
- "4318:4318" # OTLP HTTP receiver
- "8889:8889" # Prometheus exporter
restart: always
profiles: ["observability"]
# Prometheus - Metrics and Tracing
prometheus:
image: prom/prometheus:v2.53.1
container_name: robosystems-prometheus
volumes:
- ./robosystems/middleware/otel/config/prometheus.yaml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
ports:
- "9090:9090"
restart: always
profiles: ["observability"]
# Grafana - Dashboard for Prometheus and OpenTelemetry
grafana:
image: grafana/grafana:11.2.1
container_name: robosystems-grafana
ports:
- "4000:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./robosystems/middleware/otel/config/datasources:/etc/grafana/provisioning/datasources
- ./robosystems/middleware/otel/config/dashboards:/etc/grafana/provisioning/dashboards
environment:
- GF_SECURITY_ADMIN_PASSWORD=password
- GF_SECURITY_ADMIN_USER=admin
- GF_INSTALL_PLUGINS=
restart: always
profiles: ["observability"]
# RoboSystems App Frontend
robosystems-app:
container_name: robosystems-app
image: ${ROBOSYSTEMS_APP_IMAGE:-robosystems-app-local}
pull_policy: ${ROBOSYSTEMS_APP_PULL_POLICY:-never}
build:
context: ../robosystems-app
dockerfile: Dockerfile
environment:
- NODE_ENV=development
- ENVIRONMENT=dev
- NEXT_PUBLIC_ROBOSYSTEMS_API_URL=http://localhost:8000
- NEXT_PUBLIC_ROBOSYSTEMS_APP_URL=http://localhost:3000
- NEXT_PUBLIC_ROBOLEDGER_APP_URL=http://localhost:3001
- NEXT_PUBLIC_ROBOINVESTOR_APP_URL=http://localhost:3002
- NEXT_PUBLIC_S3_ENDPOINT_URL=http://localhost:4566
- NEXT_PUBLIC_MAINTENANCE_MODE=true
ports:
- 3000:3000
volumes:
- ../robosystems-app/src:/app/src:ro
- ../robosystems-app/public:/app/public:ro
- ../robosystems-app/package.json:/app/package.json:ro
restart: always
deploy:
resources:
limits:
memory: 512m
cpus: "0.5"
reservations:
memory: 256m
cpus: "0.25"
profiles: ["robosystems-app", "apps", "all"]
# RoboLedger App Frontend
roboledger-app:
container_name: roboledger-app
image: ${ROBOLEDGER_APP_IMAGE:-roboledger-app-local}
pull_policy: ${ROBOLEDGER_APP_PULL_POLICY:-never}
build:
context: ../roboledger-app
dockerfile: Dockerfile
environment:
- NODE_ENV=development
- ENVIRONMENT=dev
- NEXT_PUBLIC_ROBOSYSTEMS_API_URL=http://localhost:8000
- NEXT_PUBLIC_ROBOSYSTEMS_APP_URL=http://localhost:3000
- NEXT_PUBLIC_ROBOLEDGER_APP_URL=http://localhost:3001
- NEXT_PUBLIC_ROBOINVESTOR_APP_URL=http://localhost:3002
- NEXT_PUBLIC_S3_ENDPOINT_URL=http://localhost:4566
- NEXT_PUBLIC_MAINTENANCE_MODE=true
ports:
- 3001:3000
volumes:
- ../roboledger-app/src:/app/src:ro
- ../roboledger-app/public:/app/public:ro
- ../roboledger-app/package.json:/app/package.json:ro
restart: always
deploy:
resources:
limits:
memory: 512m
cpus: "0.5"
reservations:
memory: 256m
cpus: "0.25"
profiles: ["roboledger-app", "apps", "all"]
# RoboInvestor App Frontend
roboinvestor-app:
container_name: roboinvestor-app
image: ${ROBOINVESTOR_APP_IMAGE:-roboinvestor-app-local}
pull_policy: ${ROBOINVESTOR_APP_PULL_POLICY:-never}
build:
context: ../roboinvestor-app
dockerfile: Dockerfile
environment:
- NODE_ENV=development
- ENVIRONMENT=dev
- NEXT_PUBLIC_ROBOSYSTEMS_API_URL=http://localhost:8000
- NEXT_PUBLIC_ROBOSYSTEMS_APP_URL=http://localhost:3000
- NEXT_PUBLIC_ROBOLEDGER_APP_URL=http://localhost:3001
- NEXT_PUBLIC_ROBOINVESTOR_APP_URL=http://localhost:3002
- NEXT_PUBLIC_S3_ENDPOINT_URL=http://localhost:4566
- NEXT_PUBLIC_MAINTENANCE_MODE=true
ports:
- 3002:3000
volumes:
- ../roboinvestor-app/src:/app/src:ro
- ../roboinvestor-app/public:/app/public:ro
- ../roboinvestor-app/package.json:/app/package.json:ro
restart: always
deploy:
resources:
limits:
memory: 512m
cpus: "0.5"
reservations:
memory: 256m
cpus: "0.25"
profiles: ["roboinvestor-app", "apps", "all"]
volumes:
prometheus_data:
grafana_data: