-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
153 lines (146 loc) · 4.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
153 lines (146 loc) · 4.41 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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: kawaachai
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
kafka:
image: confluentinc/cp-kafka:7.6.1
ports:
- '9094:9094'
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093,PLAINTEXT_HOST://0.0.0.0:9094
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
healthcheck:
test: ['CMD-SHELL', 'kafka-topics --bootstrap-server localhost:9092 --list || exit 1']
interval: 15s
timeout: 10s
retries: 10
db-init:
image: node:20-alpine
working_dir: /workspace
env_file:
- .env.example
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/kawaachai
volumes:
- .:/workspace
command: sh -c "npm ci && npm run setup:db"
depends_on:
postgres:
condition: service_healthy
restart: 'no'
trigger-monitor:
build:
context: .
dockerfile: packages/trigger-monitor/Dockerfile
env_file:
- .env.example
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/kawaachai
REDIS_URL: redis://redis:6379
KAFKA_BROKERS: kafka:9092
TRIGGER_MONITOR_PORT: 3001
depends_on:
db-init:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
kafka:
condition: service_healthy
ports:
- '3001:3001'
claims-service:
build:
context: .
dockerfile: packages/claims-service/Dockerfile
env_file:
- .env.example
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/kawaachai
REDIS_URL: redis://redis:6379
KAFKA_BROKERS: kafka:9092
CLAIMS_SERVICE_PORT: 3002
depends_on:
db-init:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
kafka:
condition: service_healthy
ports:
- '3002:3002'
spec5-admin-api:
build:
context: .
dockerfile: packages/spec5/admin-api/Dockerfile
env_file:
- .env.example
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/kawaachai
SPEC5_ADMIN_API_PORT: 3010
ADMIN_BEARER_TOKEN: ${ADMIN_BEARER_TOKEN:-change-me}
CLAIMS_BASE_URL: http://claims-service:3002
TRIGGER_BASE_URL: http://trigger-monitor:3001
SPEC5_LLM_PROVIDER: ${SPEC5_LLM_PROVIDER:-groq}
SPEC5_LLM_MODEL: ${SPEC5_LLM_MODEL:-llama-3.1-8b-instant}
SPEC5_LLM_API_KEY: ${SPEC5_LLM_API_KEY:-}
SPEC5_LLM_TIMEOUT_MS: ${SPEC5_LLM_TIMEOUT_MS:-10000}
SPEC5_RUN_SEED: ${SPEC5_RUN_SEED:-true}
LOG_LEVEL: info
SERVICE_NAME: spec5-admin-api
depends_on:
db-init:
condition: service_completed_successfully
trigger-monitor:
condition: service_started
claims-service:
condition: service_started
ports:
- '3010:3010'
spec5-admin-dashboard:
build:
context: .
dockerfile: packages/spec5/admin-dashboard/Dockerfile
args:
VITE_ADMIN_API_BASE_URL: ${VITE_ADMIN_API_BASE_URL:-http://localhost:3010}
VITE_ADMIN_BEARER_TOKEN: ${VITE_ADMIN_BEARER_TOKEN:-change-me}
VITE_ADMIN_USER: ${VITE_ADMIN_USER:-spec5-admin-ui}
depends_on:
spec5-admin-api:
condition: service_started
ports:
- '5178:80'