-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose-development.yml
325 lines (324 loc) · 9.31 KB
/
docker-compose-development.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
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
version: "3.8"
services:
jvmcc-service-discovery:
container_name: jvmcc-service-discovery
image: jvmcc-service-discovery:latest
build:
context: jvmcc-service-discovery
dockerfile: Dockerfile
environment:
SPRING_PROFILE: development
SERVICE_DISCOVERY_PORT: 9000
SERVICE_DISCOVERY_HOSTNAME: jvmcc-service-discovery
SERVICE_DISCOVERY_NAME: jvmcc-service-discovery
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
ports:
- "9000:9000"
networks:
- jvmcc-local
# API Gateway container. This container is the only container exposed to the outside
jvmcc-api-gateway:
container_name: jvmcc-api-gateway
image: jvmcc-api-gateway:latest
build:
context: jvmcc-api-gateway
dockerfile: Dockerfile
environment:
SPRING_PROFILE: development
API_GATEWAY_PORT: 8080
API_GATEWAY_NAME: jvmcc-api-gateway
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka/
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
API_GATEWAY_USERNAME: jvmcc
API_GATEWAY_PASSWORD: jvmcc
API_GATEWAY_ADMIN_USERNAME: admin
API_GATEWAY_ADMIN_PASSWORD: admin
ports:
- "8080:8080"
depends_on:
- jvmcc-config-server
- jvmcc-service-discovery
networks:
- jvmcc-local
jvmcc-product-service:
container_name: jvmcc-product-service
image: jvmcc-product-service:latest
build:
context: jvmcc-product-service
dockerfile: Dockerfile
environment:
PRODUCT_SERVICE_PORT: 8092
SPRING_PROFILE: development
EUREKA_CLIENT_ENABLED: true
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
ports:
- "8092:8092"
deploy:
restart_policy:
condition: on-failure
depends_on:
- jvmcc-config-server
- jvmcc-service-discovery
- jvmcc-review-service
- zipkin-server
profiles:
- non-reactive
networks:
- jvmcc-local
jvmcc-product-reactive-service:
container_name: jvmcc-product-reactive-service
image: jvmcc-product-reactive-service:latest
build:
context: jvmcc-product-reactive-service
dockerfile: Dockerfile
environment:
PRODUCT_SERVICE_PORT: 8092
SPRING_PROFILE: development
EUREKA_CLIENT_ENABLED: true
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
ports:
- "8092:8092"
deploy:
restart_policy:
condition: on-failure
depends_on:
- jvmcc-service-discovery
- jvmcc-ldap-server
- zookeeper
- kafka
- zipkin-server
profiles:
- reactive
networks:
- jvmcc-local
jvmcc-review-service:
container_name: jvmcc-review-service
image: jvmcc-review-service:latest
build:
context: jvmcc-review-service
dockerfile: Dockerfile
environment:
REVIEW_SERVICE_PORT: 8091
SPRING_PROFILE: development
EUREKA_CLIENT_ENABLED: true
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
MYSQL_SERVER_URL: jdbc:mysql://jvmcc-mysql:3306/jvmcc?verifyServerCertificate=false&useSSL=true&requireSSL=true
MYSQL_USERNAME: jvmcc
MYSQL_PASSWORD: jvmcc
ports:
- "8091:8091"
deploy:
restart_policy:
condition: on-failure
depends_on:
- jvmcc-config-server
- jvmcc-service-discovery
- jvmcc-mysql
- zipkin-server
profiles:
- non-reactive
networks:
- jvmcc-local
jvmcc-review-reactive-service:
container_name: jvmcc-review-reactive-service
image: jvmcc-review-reactive-service:latest
build:
context: jvmcc-review-reactive-service
dockerfile: Dockerfile
environment:
REVIEW_SERVICE_PORT: 8091
SPRING_PROFILE: development
EUREKA_CLIENT_ENABLED: true
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
SECURITY_USERNAME: jvmcc
SECURITY_PASSWORD: jvmcc
SPRING_DATA_MONGODB_HOST: mongo
ports:
- "8091:8091"
deploy:
restart_policy:
condition: on-failure
depends_on:
- jvmcc-config-server
- jvmcc-service-discovery
- jvmcc-mongodb
- jvmcc-ldap-server
- zookeeper
- kafka
- zipkin-server
links:
- jvmcc-service-discovery
profiles:
- reactive
networks:
- jvmcc-local
jvmcc-config-server:
container_name: jvmcc-config-server
image: jvmcc-config-server:latest
build:
context: jvmcc-config-server
dockerfile: Dockerfile
environment:
CONFIG_SERVER_PORT: 8888
CONFIG_APPLICATION_NAME: jvmcc-config-server
SPRING_PROFILE: development
EUREKA_CLIENT_ENABLED: true
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://jvmcc-service-discovery:9000/eureka
ZIPKIN_SERVER_URL: http://jvmcc-zipkin:9411
SECURITY_USERNAME: jvmcc
SECURITY_PASSWORD: jvmcc
ports:
- "8888:8888"
deploy:
restart_policy:
condition: on-failure
depends_on:
- jvmcc-service-discovery
networks:
- jvmcc-local
zipkin-server:
container_name: zipkin-server
image: openzipkin/zipkin:2.21.0
environment:
ZIPKIN_PORT: 9411
SPRING_PROFILE: development
CLOUD_CONFIG_URI: optional:configserver:http://jvmcc-config-server:8888/
CLOUD_CONFIG_USERNAME: jvmcc
CLOUD_CONFIG_PASSWORD: jvmcc
ports:
- "9411:9411"
deploy:
restart_policy:
condition: on-failure
networks:
- jvmcc-local
jvmcc-mysql:
container_name: jvmcc-mysql
image: mysql/mysql-server:8.0
build:
context: jvmcc-mysql
dockerfile: Dockerfile
ports:
- 3306:3306
volumes:
- ./jvmcc-mysql/initSQL.sql:/docker-entrypoint-initdb.d/initSQL.sql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
profiles:
- non-reactive
networks:
- jvmcc-local
jvmcc-mongodb:
container_name: jvmcc-mongodb
image: jvmcc-mongodb
build:
context: jvmcc-mongodb
dockerfile: Dockerfile
ports:
- 27017:27017
volumes:
- mongodata:/data/db
profiles:
- reactive
networks:
- jvmcc-local
zookeeper:
image: 'bitnami/zookeeper:latest'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
profiles:
- reactive
networks:
- jvmcc-local
kafka:
image: 'bitnami/kafka:latest'
ports:
- 9092:9092
environment:
KAFKA_LISTENERS: OUTSIDE://kafka:9092,INSIDE://localhost:9093
KAFKA_ADVERTISED_LISTENERS: OUTSIDE://kafka:9092,INSIDE://localhost:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: OUTSIDE:PLAINTEXT,INSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: 'yes'
depends_on:
- zookeeper
profiles:
- reactive
networks:
- jvmcc-local
keycloak:
image: quay.io/keycloak/keycloak:18.0.2
container_name: keycloak
environment:
KEYCLOAK_ADMIN: jvmcc
KEYCLOAK_ADMIN_PASSWORD: jvmcc
KC_DB: mysql
KC_DB_URL_HOST: jvmcc-mysql
KC_DB_URL_DATABASE: keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
ports:
- "8080:8084"
command: start-dev
depends_on:
- jvmcc-mysql
healthcheck:
test: "curl -f http://localhost:8080/admin || exit 1"
interval: 10s
timeout: 5s
retries: 5
profiles:
- donotstart
jvmcc-ldap-server:
image: jvmcc-ldap-server
container_name: jvmcc-ldap-server
build:
context: jvmcc-ldap-server
dockerfile: Dockerfile
environment:
LDAP_ORGANISATION: danielsobrado.com
LDAP_DOMAIN: jvmcc.com
ports:
- "389:389"
volumes:
- ldap_data:/var/lib/ldap
- ldap_config:/etc/ldap/slapd.d
networks:
- jvmcc-local
profiles:
- donotstart
volumes:
# I commented the MySQL volume, because I don't want to have data, the initSQL.sql file won't be executed
# mysql_data:
mongodata:
ldap_data:
ldap_config:
networks:
jvmcc-local:
external: false