-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
328 lines (305 loc) · 6.79 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
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
name: telco-crm-pair2
services:
zookeeper:
image: 'bitnami/zookeeper:latest'
container_name: zookeeper
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- common
kafka:
image: 'bitnami/kafka:latest'
container_name: kafka
ports:
- "9092:9092"
- "29092:29092"
depends_on:
- zookeeper
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=LISTENER_DEVELOPMENT://localhost:9092,LISTENER_PRODUCTION://kafka:29092
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=LISTENER_DEVELOPMENT:PLAINTEXT,LISTENER_PRODUCTION:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=LISTENER_DEVELOPMENT://localhost:9092,LISTENER_PRODUCTION://kafka:29092
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=LISTENER_PRODUCTION
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
networks:
- common
config-server:
build: ./configServer
container_name: config-server
restart: always
volumes:
- ./configServer:/app
ports:
- 8050:8050
environment:
SPRING_CLOUD_CONFIG_SERVER_GIT_URI: https://github.com/sugrado/telco-crm-configuration
networks:
- common
discovery-server:
build: ./discoveryServer
ports:
- 7000:7000
container_name: discovery-server
restart: always
volumes:
- ./discoveryServer:/app
depends_on:
- config-server
networks:
- common
gateway-service:
build: ./gatewayService
container_name: gateway-service
restart: always
volumes:
- ./gatewayService:/app
ports:
- 7002:7002
depends_on:
- config-server
- discovery-server
networks:
- common
customer-db:
image: postgres:16
container_name: customer-db
ports:
- 5460:5432
restart: always
volumes:
- customer_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pair2
- POSTGRES_PASSWORD=pair2crm
- POSTGRES_DB=crm_customer
networks:
- common
customer-service:
build: ./customerService
container_name: customer-service
restart: always
volumes:
- ./customerService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- customer-db
- discovery-server
- config-server
networks:
- common
identity-db:
image: postgres:16
container_name: identity-db
ports:
- 5461:5432
restart: always
volumes:
- identity_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pair2
- POSTGRES_PASSWORD=pair2crm
- POSTGRES_DB=crm_identity
networks:
- common
identity-service:
build: ./identityService
container_name: identity-service
restart: always
volumes:
- ./identityService:/app
depends_on:
- identity-db
- discovery-server
- config-server
- identity-redis
networks:
- common
identity-redis:
image: redis:latest
container_name: identity-redis
restart: always
ports:
- 6379:6379
networks:
- common
catalog-db:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: catalog-db
user: root
ports:
- 1433:1433
restart: always
volumes:
- catalog_db:/var/opt/mssql/data
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=Mssql123.
- MSSQL_PID=Express
networks:
- common
catalog-service:
build: ./catalogService
container_name: catalog-service
restart: always
volumes:
- ./catalogService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- catalog-db
- discovery-server
- config-server
- kafka
networks:
- common
account-db:
image: postgres:16
container_name: account-db
ports:
- 5462:5432
restart: always
volumes:
- account_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pair2
- POSTGRES_PASSWORD=pair2crm
- POSTGRES_DB=crm_account
networks:
- common
account-service:
build: ./accountService
container_name: account-service
restart: always
volumes:
- ./accountService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- account-db
- discovery-server
- config-server
- kafka
networks:
- common
basket-redis:
image: redis:latest
container_name: basket-redis
restart: always
ports:
- 6380:6379
networks:
- common
basket-service:
build: ./basketService
container_name: basket-service
restart: always
volumes:
- ./basketService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- basket-redis
- discovery-server
- config-server
- kafka
networks:
- common
invoice-db:
image: postgres:16
container_name: invoice-db
ports:
- 5463:5432
restart: always
volumes:
- invoice_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pair2
- POSTGRES_PASSWORD=pair2crm
- POSTGRES_DB=crm_invoice
networks:
- common
invoice-service:
build: ./invoiceService
container_name: invoice-service
restart: always
volumes:
- ./invoiceService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- invoice-db
- discovery-server
- config-server
- kafka
networks:
- common
order-db:
image: postgres:16
container_name: order-db
ports:
- 5464:5432
restart: always
volumes:
- order_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=pair2
- POSTGRES_PASSWORD=pair2crm
- POSTGRES_DB=crm_order
networks:
- common
order-service:
build: ./orderService
container_name: order-service
restart: always
volumes:
- ./orderService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- order-db
- discovery-server
- config-server
- kafka
networks:
- common
search-db:
image: mongo:latest
container_name: search-db
ports:
- 27017:27017
restart: always
volumes:
- search_db:/etc/mongo
networks:
- common
search-service:
build: ./searchService
container_name: search-service
restart: always
volumes:
- ./searchService:/app
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092
depends_on:
- search-db
- discovery-server
- config-server
- kafka
networks:
- common
volumes:
customer_db:
identity_db:
catalog_db:
account_db:
search_db:
invoice_db:
order_db:
networks:
common:
driver: bridge