-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
262 lines (249 loc) · 7 KB
/
docker-compose.yml
File metadata and controls
262 lines (249 loc) · 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
networks:
rca-net:
driver: bridge
volumes:
tempo-data:
prometheus-data:
grafana-data:
ollama-data:
services:
tempo:
image: grafana/tempo:2.6.1
container_name: tempo
command: ["-config.file=/etc/tempo.yml"]
volumes:
- ./infra/tempo.yml:/etc/tempo.yml
- tempo-data:/var/tempo
ports:
- "3200:3200"
- "4317:4317"
networks:
- rca-net
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3200/ready"]
interval: 5s
timeout: 5s
retries: 10
prometheus:
image: prom/prometheus:v2.54.1
container_name: prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.enable-remote-write-receiver
volumes:
- ./infra/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
ports:
- "9090:9090"
networks:
- rca-net
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/ready"]
interval: 5s
timeout: 5s
retries: 10
grafana:
image: grafana/grafana:11.3.0
container_name: grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_AUTH_ANONYMOUS_ENABLED=true
volumes:
- grafana-data:/var/lib/grafana
- ./infra/grafana/provisioning:/etc/grafana/provisioning
ports:
- "3000:3000"
depends_on:
tempo:
condition: service_healthy
prometheus:
condition: service_healthy
networks:
- rca-net
otel-collector:
image: otel/opentelemetry-collector-contrib:0.111.0
container_name: otel-collector
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
- ./infra/otel-collector-config.yml:/etc/otel-collector-config.yml
ports:
- "4318:4318"
- "13133:13133"
depends_on:
tempo:
condition: service_healthy
prometheus:
condition: service_healthy
networks:
- rca-net
ollama:
image: ollama/ollama:latest
container_name: ollama
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
networks:
- rca-net
kafka:
image: confluentinc/cp-kafka:7.7.0
container_name: kafka
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_QUORUM_VOTERS: 1@kafka:9093
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qg"
networks:
- rca-net
healthcheck:
test: ["CMD", "kafka-broker-api-versions", "--bootstrap-server", "localhost:9092"]
interval: 10s
timeout: 10s
retries: 10
order-service:
build:
context: .
dockerfile: Dockerfile
args:
SERVICE: order-service
container_name: order-service
ports:
- "8081:8081"
environment:
- PORT=8081
- PAYMENT_SERVICE_URL=http://payment-service:8082
- INVENTORY_SERVICE_URL=http://inventory-service:8083
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
- JAVA_TOOL_OPTIONS=-javaagent:/otel-agent/opentelemetry-javaagent.jar
- OTEL_SERVICE_NAME=order-service
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
volumes:
- ./infra/otel-agent:/otel-agent:ro
depends_on:
otel-collector:
condition: service_started
kafka:
condition: service_healthy
networks:
- rca-net
payment-service:
build:
context: .
dockerfile: Dockerfile
args:
SERVICE: payment-service
container_name: payment-service
ports:
- "8082:8082"
environment:
- PORT=8082
- INVENTORY_SERVICE_URL=http://inventory-service:8083
- JAVA_TOOL_OPTIONS=-javaagent:/otel-agent/opentelemetry-javaagent.jar
- OTEL_SERVICE_NAME=payment-service
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
volumes:
- ./infra/otel-agent:/otel-agent:ro
depends_on:
otel-collector:
condition: service_started
inventory-service:
condition: service_started
networks:
- rca-net
inventory-service:
build:
context: .
dockerfile: Dockerfile
args:
SERVICE: inventory-service
container_name: inventory-service
ports:
- "8083:8083"
environment:
- PORT=8083
- JAVA_TOOL_OPTIONS=-javaagent:/otel-agent/opentelemetry-javaagent.jar
- OTEL_SERVICE_NAME=inventory-service
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
volumes:
- ./infra/otel-agent:/otel-agent:ro
depends_on:
otel-collector:
condition: service_started
networks:
- rca-net
notification-service:
build:
context: .
dockerfile: Dockerfile
args:
SERVICE: notification-service
container_name: notification-service
ports:
- "8084:8084"
environment:
- PORT=8084
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
- JAVA_TOOL_OPTIONS=-javaagent:/otel-agent/opentelemetry-javaagent.jar
- OTEL_SERVICE_NAME=notification-service
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
volumes:
- ./infra/otel-agent:/otel-agent:ro
depends_on:
otel-collector:
condition: service_started
kafka:
condition: service_healthy
networks:
- rca-net
rca-agent:
build:
context: .
dockerfile: Dockerfile.agent
container_name: rca-agent
ports:
- "${RCA_AGENT_PORT:-8080}:8080"
environment:
- TEMPO_URL=http://tempo:3200
- PROMETHEUS_URL=http://prometheus:9090
- OLLAMA_URL=http://ollama:11434
- LLM_MODE=${LLM_MODE:-ollama}
- LLM_LOCAL_MODEL=${LLM_LOCAL_MODEL:-llama3.2}
- LLM_STANDARD_MODEL=${LLM_STANDARD_MODEL:-gemini-3.1-flash-lite}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- RCA_CONFIDENCE_THRESHOLD=${RCA_CONFIDENCE_THRESHOLD:-0.75}
depends_on:
tempo:
condition: service_healthy
prometheus:
condition: service_healthy
otel-collector:
condition: service_started
networks:
- rca-net
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:8080/actuator/health"]
interval: 10s
timeout: 5s
retries: 10