-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
262 lines (248 loc) · 6.16 KB
/
docker-compose.yml
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
services:
loki:
image: grafana/loki:main
container_name: loki
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"
networks:
- json-placeholder-service-network
volumes:
- loki-data:/data
prometheus:
image: prom/prometheus:v2.46.0
container_name: prometheus
command: --enable-feature=exemplar-storage --config.file=/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- json-placeholder-service-network
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
tempo:
image: grafana/tempo:2.2.2
container_name: tempo
command: -config.file=/etc/tempo.yaml
ports:
- "3110:3100" # Tempo
- "9411:9411" # zipkin
networks:
- json-placeholder-service-network
volumes:
- ./docker/tempo/tempo.yml:/etc/tempo.yaml:ro
- tempo-data:/tmp/tempo
grafana:
image: grafana/grafana:10.1.0
container_name: grafana
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
networks:
- json-placeholder-service-network
volumes:
- ./docker/grafana:/etc/grafana/provisioning/datasources:ro
config-service:
container_name: config-service
build:
context: ./config-service/
dockerfile: Dockerfile
ports:
- "8888:8888"
networks:
- json-placeholder-service-network
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8888/post-service/default" ]
interval: 30s
timeout: 5s
retries: 5
discovery-service:
container_name: discovery-service
build:
context: ./discovery-service/
dockerfile: Dockerfile
ports:
- "8761:8761"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8761/actuator/health" ]
interval: 30s
timeout: 10s
retries: 5
gateway-service:
container_name: gateway-service
build:
context: ./gateway-service/
dockerfile: Dockerfile
ports:
- "8090:8090"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
post-service:
container_name: post-service
build:
context: ./post-service
dockerfile: Dockerfile
ports:
- "8080:8080"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
comment-service:
container_name: comment-service
build:
context: ./comment-service
dockerfile: Dockerfile
ports:
- "8081:8081"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
album-service:
container_name: album-service
build:
context: ./album-service
dockerfile: Dockerfile
ports:
- "8082:8082"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
photo-service:
container_name: photo-service
build:
context: ./photo-service
dockerfile: Dockerfile
ports:
- "8083:8083"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
todo-service:
container_name: todo-service
build:
context: ./todo-service
dockerfile: Dockerfile
ports:
- "8084:8084"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
user-service:
container_name: user-service
build:
context: ./user-service
dockerfile: Dockerfile
ports:
- "8085:8085"
networks:
- json-placeholder-service-network
environment:
- SPRING_PROFILES_ACTIVE=dev
depends_on:
config-service:
condition: service_healthy
discovery-service:
condition: service_healthy
loki:
condition: service_started
prometheus:
condition: service_started
tempo:
condition: service_started
grafana:
condition: service_started
networks:
json-placeholder-service-network:
driver: bridge
volumes:
loki-data:
tempo-data: