-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
executable file
·1301 lines (1261 loc) · 45.4 KB
/
docker-compose.dev.yml
File metadata and controls
executable file
·1301 lines (1261 loc) · 45.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
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: deepiri-dev
# IMPORTANT: Set DOCKER_BUILDKIT=1 before building to enable layer caching
# This prevents 50GB+ of dangling images on every build
x-build-args: &build-args
# Use BuildKit for better caching and no dangling images
DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
# Minimal logging - logs are automatically cleared and not saved
x-logging: &minimal-logging
driver: "local"
options:
max-size: "1m" # Only 1MB per file
max-file: "1" # Only 1 file (no rotation backup)
compress: "false" # No compression (faster cleanup)
services:
# PostgreSQL Database - Auth
postgres-auth:
image: postgres:16-alpine
container_name: deepiri-postgres-auth-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_AUTH_USER:-deepiri_auth}
POSTGRES_PASSWORD: ${POSTGRES_AUTH_PASSWORD:-deepiripassword}
POSTGRES_DB: ${POSTGRES_AUTH_DB:-auth_db}
volumes:
- postgres_auth_dev_data:/var/lib/postgresql/data
- ./scripts/database/postgres-init-auth.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- deepiri-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_AUTH_USER:-deepiri_auth}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# PostgreSQL Database - Core
postgres-core:
image: postgres:16-alpine
container_name: deepiri-postgres-core-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5433:5432"
environment:
POSTGRES_USER: ${POSTGRES_CORE_USER:-deepiri}
POSTGRES_PASSWORD: ${POSTGRES_CORE_PASSWORD:-deepiripassword}
POSTGRES_DB: ${POSTGRES_CORE_DB:-deepiri}
volumes:
- postgres_core_dev_data:/var/lib/postgresql/data
- ./scripts/database/postgres-init-core.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- deepiri-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_CORE_USER:-deepiri}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# PostgreSQL Database - Cyrex
postgres-cyrex:
image: postgres:16-alpine
container_name: deepiri-postgres-cyrex-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5434:5432"
environment:
POSTGRES_USER: ${POSTGRES_CYREX_USER:-deepiri_cyrex}
POSTGRES_PASSWORD: ${POSTGRES_CYREX_PASSWORD:-deepiripassword}
POSTGRES_DB: ${POSTGRES_CYREX_DB:-cyrex_db}
volumes:
- postgres_cyrex_dev_data:/var/lib/postgresql/data
- ./scripts/database/postgres-init-cyrex.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- deepiri-dev-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_CYREX_USER:-deepiri_cyrex}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# PostgreSQL Database - Intelligence (includes MLflow)
postgres-intelligence:
image: postgres:16-alpine
container_name: deepiri-postgres-intelligence-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5435:5432"
environment:
POSTGRES_USER: ${POSTGRES_INTELLIGENCE_USER:-deepiri_intel}
POSTGRES_PASSWORD: ${POSTGRES_INTELLIGENCE_PASSWORD:-deepiripassword}
POSTGRES_DB: ${POSTGRES_INTELLIGENCE_DB:-intelligence_db}
volumes:
- postgres_intelligence_dev_data:/var/lib/postgresql/data
- ./scripts/database/postgres-init-intelligence.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- deepiri-dev-network
depends_on:
- postgres-auth
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_INTELLIGENCE_USER:-deepiri_intel}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# pgAdmin - Database Admin UI (optional, can be commented out for production)
pgadmin:
build:
context: ./ops/docker/pgadmin
dockerfile: Dockerfile
container_name: deepiri-pgadmin-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@deepiri.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin_dev_data:/var/lib/pgadmin
healthcheck:
# Use python to check if pgAdmin is responding (more reliable than curl)
test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:80').read()\" || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 45s # pgAdmin can take 30-60s to initialize on first boot
depends_on:
- postgres-core
networks:
- deepiri-dev-network
# Adminer - Lightweight Database Viewer (for quick inspection)
adminer:
image: adminer:latest
container_name: deepiri-adminer-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_SERVER: postgres-core
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
depends_on:
- postgres-core
networks:
- deepiri-dev-network
# Redis Cache
redis:
image: redis:7.2-alpine
container_name: deepiri-redis-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "6380:6379" # Using 6380 to avoid conflict with system Redis on 6379
command: redis-server --requirepass ${REDIS_PASSWORD:-redispassword} --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_dev_data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-redispassword}", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- deepiri-dev-network
kafka:
image: confluentinc/cp-kafka:7.5.0
container_name: deepiri-kafka-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
CLUSTER_ID: "Mvfv23irSXm93djf5t5WwA"
networks:
- deepiri-dev-network
# InfluxDB for Time-Series Analytics
influxdb:
image: influxdb:2.7
container_name: deepiri-influxdb-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "8086:8086"
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_USER:-admin}
DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUXDB_PASSWORD:-adminpassword}
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_ORG:-deepiri}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_BUCKET:-analytics}
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUXDB_TOKEN:-your-influxdb-token}
volumes:
- influxdb_dev_data:/var/lib/influxdb2
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8086/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
networks:
- deepiri-dev-network
# etcd service for Milvus metadata
etcd:
image: quay.io/coreos/etcd:v3.5.5
container_name: deepiri-etcd-dev
restart: unless-stopped
logging: *minimal-logging
environment:
ETCD_AUTO_COMPACTION_MODE: revision
ETCD_AUTO_COMPACTION_RETENTION: 1000
ETCD_QUOTA_BACKEND_BYTES: 4294967296
ETCD_SNAPSHOT_COUNT: 50000
volumes:
- etcd_dev_data:/etcd
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health", "--endpoints=http://127.0.0.1:2379"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
networks:
- deepiri-dev-network
# MinIO service for Milvus object storage
# Updated to latest version (2024) with proper parity settings for data redundancy
minio:
image: minio/minio:latest
container_name: deepiri-minio-dev
restart: unless-stopped
logging: *minimal-logging
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
volumes:
- minio_dev_data:/data
command: minio server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
start_period: 40s
ports:
- "9000:9000" # API
- "9001:9001" # Console
networks:
- deepiri-dev-network
# Milvus Vector Database for RAG (needs MinIO and etcd services)
milvus:
image: milvusdb/milvus:v2.3.0
container_name: deepiri-milvus-dev
restart: unless-stopped
logging: *minimal-logging
command: ["milvus", "run", "standalone"]
ports:
- "19530:19530"
- "9091:9091"
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
# Reduce log verbosity - set to WARN to suppress INFO level noise
COMMON_LOG_LEVEL: warn
volumes:
- milvus_dev_data:/var/lib/milvus
healthcheck:
# Check health endpoint - waits for all components (including rootcoord) to be ready
# Increased start_period to give rootcoord time to start before other components try to connect
test: ["CMD-SHELL", "curl -f http://localhost:9091/healthz || exit 1"]
interval: 15s
timeout: 10s
retries: 10
start_period: 90s # Increased to give rootcoord time to start first
depends_on:
- etcd
- minio
networks:
- deepiri-dev-network
# API Gateway - Routes requests to all microservices
api-gateway:
build:
context: ./platform-services
dockerfile: backend/deepiri-api-gateway/Dockerfile
secrets:
- github_token
image: deepiri-dev-api-gateway:latest
pull_policy: never
container_name: deepiri-api-gateway-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "${API_GATEWAY_PORT:-5100}:5000" # Using 5100 externally to avoid conflict with macOS AirPlay on port 5000
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5000
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: api-gateway # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-api-gateway/src:/app/src
- ./platform-services/backend/deepiri-api-gateway/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
depends_on:
- auth-service
- task-orchestrator
- engagement-service
- platform-analytics-service
- notification-service
- challenge-service
- realtime-gateway
- language-intelligence-service
- messaging-service
- synapse
# cyrex dependency removed - only needed by AI/ML team
# external-bridge-service dependency removed - only needed by Backend Team
networks:
- deepiri-dev-network
# Auth Service
auth-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-auth-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-auth-service:latest
pull_policy: never
container_name: deepiri-auth-service-dev
restart: unless-stopped
logging: *minimal-logging
user: root
ports:
- "5001:5001"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5001
DATABASE_URL: postgresql://${POSTGRES_AUTH_USER:-deepiri_auth}:${POSTGRES_AUTH_PASSWORD:-deepiripassword}@postgres-auth:5432/${POSTGRES_AUTH_DB:-auth_db}
SYNAPSE_URL: http://synapse:8002
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
JWT_SECRET: ${JWT_SECRET}
INTERNAL_SERVICE_SECRET: ${INTERNAL_SERVICE_SECRET}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
K8S_SERVICE_NAME: auth-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
command: sh -c "(if [ -f /usr/local/bin/prisma-baseline.sh ]; then /usr/local/bin/prisma-baseline.sh; else echo '[Prisma Baseline] Script not found, skipping baseline (rebuild image to enable)'; npx prisma migrate deploy || true; fi) && npx prisma generate && npm run dev"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- postgres-auth
- influxdb
- synapse
networks:
- deepiri-dev-network
# Task Orchestrator Service
task-orchestrator:
build:
context: ./platform-services
dockerfile: backend/deepiri-task-orchestrator/Dockerfile
secrets:
- github_token
image: deepiri-dev-task-orchestrator:latest
pull_policy: never
container_name: deepiri-task-orchestrator-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5002:5002"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5002
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
PRISMA_CLI_BINARY_TARGETS: "debian-openssl-3.0.x"
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: task-orchestrator # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-task-orchestrator/src:/app/src
- ./platform-services/backend/deepiri-task-orchestrator/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- postgres-core
- synapse
networks:
- deepiri-dev-network
# Engagement Service
engagement-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-engagement-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-engagement-service:latest
pull_policy: never
container_name: deepiri-engagement-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5003:5003"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5003
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: engagement-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-engagement-service/src:/app/src
- ./platform-services/backend/deepiri-engagement-service/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- postgres-core
- redis
- synapse
networks:
- deepiri-dev-network
# Platform Analytics Service
platform-analytics-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-platform-analytics-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-platform-analytics-service:latest
pull_policy: never
container_name: deepiri-platform-analytics-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5004:5004"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5004
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: platform-analytics-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-platform-analytics-service/src:/app/src
- ./platform-services/backend/deepiri-platform-analytics-service/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- postgres-core
- influxdb
- synapse
networks:
- deepiri-dev-network
# Notification Service
notification-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-notification-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-notification-service:latest
pull_policy: never
container_name: deepiri-notification-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5005:5005"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5005
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: notification-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-notification-service/src:/app/src
- ./platform-services/backend/deepiri-notification-service/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- postgres-core
- synapse
networks:
- deepiri-dev-network
# External Bridge Service
external-bridge-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-external-bridge-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-external-bridge-service:latest
pull_policy: never
container_name: deepiri-external-bridge-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5006:5006"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5006
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
SYNAPSE_URL: http://synapse:8002
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
EXTERNAL_BRIDGE_BASE_URL: ${EXTERNAL_BRIDGE_BASE_URL}
AUTH_SERVICE_URL: ${AUTH_SERVICE_URL}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD}
KAFKA_BROKERS: kafka:9092
K8S_SERVICE_NAME: external-bridge-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-external-bridge-service/src:/app/src
- ./platform-services/backend/deepiri-external-bridge-service/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5006/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
depends_on:
- postgres-core
- synapse
- kafka
networks:
- deepiri-dev-network
# Challenge Service
challenge-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-challenge-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-challenge-service:latest
pull_policy: never
container_name: deepiri-challenge-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5007:5007"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5007
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
SYNAPSE_URL: http://synapse:8002
K8S_SERVICE_NAME: challenge-service # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-challenge-service/src:/app/src
- ./platform-services/backend/deepiri-challenge-service/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- postgres-core
- synapse
# cyrex dependency removed - only needed by AI/ML team
networks:
- deepiri-dev-network
# Language Intelligence Service
language-intelligence-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-language-intelligence-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-language-intelligence-service:latest
pull_policy: never
container_name: deepiri-language-intelligence-service-dev
restart: unless-stopped
logging: *minimal-logging
# Port exposed for development only
# In production: Remove this port mapping - only access through API Gateway
ports:
- "5009:5003"
environment:
PORT: 5003
DATABASE_URL: postgresql://${POSTGRES_INTELLIGENCE_USER:-deepiri_intel}:${POSTGRES_INTELLIGENCE_PASSWORD:-deepiripassword}@postgres-intelligence:5435/${POSTGRES_INTELLIGENCE_DB:-intelligence_db}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redispassword}
STORAGE_PROVIDER: minio
STORAGE_BUCKET: language-intelligence-documents
STORAGE_REGION: us-east-1
STORAGE_ENDPOINT: http://minio:9000
STORAGE_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minioadmin}
STORAGE_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin}
CYREX_BASE_URL: http://cyrex:8000
CYREX_API_KEY: ${CYREX_API_KEY:-change-me}
# AUTH_SERVICE_URL: ${AUTH_SERVICE_URL:-} # Optional - set to enable auth
K8S_SERVICE_NAME: language-intelligence-service
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-language-intelligence-service/src:/app/src
- ./platform-services/backend/deepiri-language-intelligence-service/tsconfig.json:/app/tsconfig.json
command: sh -c "(if [ -f /usr/local/bin/prisma-baseline.sh ]; then /usr/local/bin/prisma-baseline.sh; else echo '[Prisma Baseline] Script not found, skipping baseline (rebuild image to enable)'; npx prisma migrate deploy || true; fi) && npx prisma generate && npm run dev"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5003/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
depends_on:
- postgres-intelligence
- redis
- minio
- cyrex
- auth-service
- synapse
networks:
- deepiri-dev-network
# Messaging Service
messaging-service:
build:
context: ./platform-services
dockerfile: backend/deepiri-messaging-service/Dockerfile
secrets:
- github_token
image: deepiri-dev-messaging-service:latest
pull_policy: never
container_name: deepiri-messaging-service-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5010:5010"
environment:
PORT: 5010
DATABASE_URL: postgresql://${POSTGRES_CORE_USER:-deepiri}:${POSTGRES_CORE_PASSWORD:-deepiripassword}@postgres-core:5433/${POSTGRES_CORE_DB:-deepiri}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redispassword}
CYREX_URL: http://cyrex:8000
CYREX_API_KEY: ${CYREX_API_KEY:-change-me}
REALTIME_GATEWAY_URL: http://realtime-gateway:5008
K8S_SERVICE_NAME: messaging-service
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-messaging-service/src:/app/src
- ./platform-services/backend/deepiri-messaging-service/tsconfig.json:/app/tsconfig.json
command: sh -c "(if [ -f /usr/local/bin/prisma-baseline.sh ]; then /usr/local/bin/prisma-baseline.sh; else echo '[Prisma Baseline] Script not found, skipping baseline (rebuild image to enable)'; npx prisma migrate deploy || true; fi) && npx prisma generate && npm run dev"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5010/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
depends_on:
- postgres-core
- redis
- cyrex
- realtime-gateway
- auth-service
- synapse
networks:
- deepiri-dev-network
# Realtime Gateway Service
realtime-gateway:
build:
context: ./platform-services
dockerfile: backend/deepiri-realtime-gateway/Dockerfile
secrets:
- github_token
image: deepiri-dev-realtime-gateway:latest
pull_policy: never
container_name: deepiri-realtime-gateway-dev
restart: unless-stopped
logging: *minimal-logging
ports:
- "5008:5008"
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
# Override or add docker-specific variables here if needed
PORT: 5008
SYNAPSE_URL: http://synapse:8002
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redispassword}
K8S_SERVICE_NAME: realtime-gateway # Filter to only load this service's configmap
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./platform-services/backend/deepiri-realtime-gateway/src:/app/src
- ./platform-services/backend/deepiri-realtime-gateway/tsconfig.json:/app/tsconfig.json
command: node dist/server.js
depends_on:
- redis
- synapse
networks:
- deepiri-dev-network
# ════════════════════════════════════════════════════════════════════════
# Ollama - CPU Mode (Default)
# ════════════════════════════════════════════════════════════════════════
# Usage (CPU mode - works on all systems):
# docker compose up -d ollama
#
# Usage (GPU mode - requires NVIDIA GPU):
# docker compose -f docker-compose.dev.yml -f docker-compose.dev.gpu.yml up -d ollama
#
# The base configuration runs in CPU mode for maximum compatibility.
# For GPU support, use the docker-compose.dev.gpu.yml override file.
#
# GPU Setup (one-time, if you have NVIDIA GPU):
# sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
# sudo systemctl restart docker
# ════════════════════════════════════════════════════════════════════════
ollama:
# Use custom Dockerfile with build-time model pre-pull
# Models are downloaded during Docker build and baked into the image
# This eliminates 1.2-3.3s first-request penalty from model loading
#
# To disable pre-pull and use check-ollama-models.sh script instead:
# docker-compose build --build-arg PRE_PULL_MODELS=false ollama
#
# To pre-pull specific models (space-separated):
# docker-compose build --build-arg MODELS="mistral:7b llama3:8b codellama:7b" ollama
build:
context: ./ops/docker/ollama
dockerfile: Dockerfile
args:
PRE_PULL_MODELS: "true" # Set to "false" to disable build-time pre-pull
MODELS: "mistral:7b llama3:8b codellama:7b" # Space-separated list of models to pre-pull
# Fallback to public image if build context doesn't exist
image: ollama/ollama:latest
container_name: deepiri-ollama-dev
restart: unless-stopped
logging: *minimal-logging
runtime: nvidia # Enable NVIDIA GPU runtime
ports:
- "${OLLAMA_PORT:-11435}:11434"
volumes:
- ollama_dev_data:/root/.ollama
environment:
OLLAMA_HOST: 0.0.0.0
OLLAMA_KEEP_ALIVE: "24h" # Increased from 30m to prevent model reloads
OLLAMA_NUM_PARALLEL: "4"
# GPU optimizations for RTX 5080 (sm_120, tensor cores)
CUDA_VISIBLE_DEVICES: "0" # Use first GPU
NVIDIA_VISIBLE_DEVICES: "all"
NVIDIA_DRIVER_CAPABILITIES: "compute,utility"
# Ollama GPU optimizations
OLLAMA_NUM_GPU: "1"
OLLAMA_GPU_OVERHEAD: "0" # Minimize VRAM overhead
OLLAMA_MAX_LOADED_MODELS: "2" # Keep 2 models in VRAM
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
networks:
- deepiri-dev-network
# Python Agent API (AI Service)
cyrex:
build:
context: .
dockerfile: ./diri-cyrex/Dockerfile
args:
BUILD_TYPE: prebuilt
BASE_IMAGE: pytorch/pytorch:2.9.1-cuda12.8-cudnn9-runtime
PYTORCH_VERSION: 2.9.1
PYTHON_VERSION: 3.11
# Using CUDA 12.8 base image for RTX 5080/5090 (sm_120) support
image: deepiri-dev-cyrex:latest
pull_policy: never
container_name: deepiri-cyrex-dev
restart: unless-stopped
logging: *minimal-logging
# Variables auto-loaded from ops/k8s/configmaps and secrets via entrypoint
environment:
K8S_SERVICE_NAME: cyrex # Filter to only load this service's configmap
OPENAI_API_KEY: ${OPENAI_API_KEY}
OPENAI_MODEL: ${OPENAI_MODEL:-gpt-4o-mini}
CORS_ORIGIN: http://localhost:5173
CYREX_API_KEY: ${CYREX_API_KEY:-change-me}
MLFLOW_TRACKING_URI: ${MLFLOW_TRACKING_URI:-http://mlflow:5000}
WANDB_API_KEY: ${WANDB_API_KEY}
# Model Registry Configuration (for modelkit integration)
MODEL_REGISTRY_TYPE: ${MODEL_REGISTRY_TYPE:-mlflow}
MODEL_REGISTRY_PATH: /app/model_registry
MODEL_CACHE_DIR: /app/models/cache
S3_ENDPOINT_URL: http://minio:9000
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
S3_BUCKET: ${S3_BUCKET:-mlflow-artifacts}
STAGING_MODEL_PATH: /app/models/staging
PRODUCTION_MODEL_PATH: /app/models/production
PINECONE_API_KEY: ${PINECONE_API_KEY}
PINECONE_ENVIRONMENT: ${PINECONE_ENVIRONMENT:-us-east1-gcp}
PINECONE_INDEX: ${PINECONE_INDEX:-deepiri}
WEAVIATE_URL: ${WEAVIATE_URL}
INFLUXDB_URL: http://influxdb:8086
INFLUXDB_TOKEN: ${INFLUXDB_TOKEN}
INFLUXDB_ORG: ${INFLUXDB_ORG:-deepiri}
INFLUXDB_BUCKET: ${INFLUXDB_BUCKET:-analytics}
MILVUS_HOST: milvus
MILVUS_PORT: 19530
# Redis Configuration
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redispassword}
# PostgreSQL Configuration
POSTGRES_HOST: postgres-cyrex
POSTGRES_PORT: 5434
POSTGRES_DB: ${POSTGRES_CYREX_DB:-cyrex_db}
POSTGRES_USER: ${POSTGRES_CYREX_USER:-deepiri_cyrex}
POSTGRES_PASSWORD: ${POSTGRES_CYREX_PASSWORD:-deepiripassword}
# Node Backend (API Gateway) Configuration
NODE_BACKEND_URL: http://api-gateway:5000
# Local LLM Configuration
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://ollama:11434}
LOCAL_LLM_BACKEND: ${LOCAL_LLM_BACKEND:-ollama}
LOCAL_LLM_MODEL: ${LOCAL_LLM_MODEL:-llama3:8b}
HF_HOME: /app/.cache/huggingface
SENTENCE_TRANSFORMERS_HOME: /app/.cache/sentence_transformers
# Streaming Service Configuration
SYNAPSE_URL: http://synapse:8002
# Override or add docker-specific variables here if needed
ports:
- "8000:8000"
volumes:
- ./ops/k8s/configmaps:/k8s-configmaps:ro
- ./ops/k8s/secrets:/k8s-secrets:ro
- ./diri-cyrex/app:/app/app
- ./diri-cyrex/train:/app/train
- ./diri-cyrex/inference:/app/inference
- ./diri-cyrex/tests:/app/tests
- ./diri-cyrex/cyrex_watcher.py:/app/cyrex_watcher.py:ro
- cyrex_cache:/app/.cache
command: python /app/cyrex_watcher.py --watch-dir /app/app --app-module app.main:app --host 0.0.0.0 --port 8000
# GPU support - automatically detects and uses available GPU
# Priority: CUDA (NVIDIA) → MPS (Apple Silicon) → CPU
#
# NVIDIA CUDA: Configured via deploy.resources below
# - Requires: NVIDIA Container Toolkit installed
# - Works on: Linux, WSL2, Windows with NVIDIA GPU
#
# Apple Silicon MPS: Automatically detected by PyTorch
# - Works natively on macOS (Docker Desktop on Mac)
# - No docker-compose config needed - PyTorch detects automatically
# - Note: Docker containers on Mac typically can't access GPU
# - For best MPS performance, run natively on macOS (not in Docker)
#
# CPU: Falls back gracefully if no GPU available
deploy:
resources:
reservations:
devices:
# NVIDIA GPU support (Linux/WSL/Windows with NVIDIA GPU)
- driver: nvidia
count: all
capabilities: [gpu]
# Note: MPS (Apple Silicon) doesn't use docker device drivers
# It's automatically detected by PyTorch when available on macOS
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
depends_on:
postgres-cyrex:
condition: service_healthy
influxdb:
condition: service_started
milvus:
condition: service_started
ollama:
condition: service_started
redis:
condition: service_started
synapse:
condition: service_started
mlflow:
condition: service_started
networks:
- deepiri-dev-network
cyrex-interface:
image: node:20-alpine
container_name: deepiri-cyrex-interface-dev
restart: unless-stopped
logging: *minimal-logging
working_dir: /app
environment:
VITE_CYREX_BASE_URL: http://localhost:8000
VITE_SYNAPSE_URL: http://localhost:8002
VITE_PORT: 5175
ports:
- "5175:5175"
volumes:
- ./diri-cyrex/cyrex-interface:/app
- /app/node_modules
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port ${VITE_PORT:-5175}"
healthcheck:
test:
[
"CMD-SHELL",
"/usr/local/bin/node -e \"require('net').connect(5175,'127.0.0.1').on('connect',()=>process.exit(0)).on('error',()=>process.exit(1))\""
]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
depends_on:
- cyrex
- synapse
networks:
- deepiri-dev-network
# Persola - Personalized Agentic Framework
persola:
build:
context: ./diri-persola
dockerfile: docker/Dockerfile
image: deepiri-dev-persola:latest
pull_policy: never
container_name: deepiri-persola-dev
restart: unless-stopped
logging: *minimal-logging
environment:
# Server
HOST: 0.0.0.0
PORT: 8002
DEBUG: "true"
CORS_ORIGIN: "*"
# Database (shares the cyrex postgres instance)