-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
349 lines (345 loc) · 8.73 KB
/
docker-compose.yaml
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
version: "3.3"
services:
regional-sul:
depends_on:
- kafka
hostname: regional-sul
image: imagem-base-simulador:0.0.1
container_name: regional-sul
ports:
- "8881:8888"
environment:
- REGIAO=Sul
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://regional-sul:8888/healthcheck-regionais || exit 1
interval: 15s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
regional-sudeste:
depends_on:
- kafka
hostname: regional-sudeste
image: imagem-base-simulador:0.0.1
container_name: regional-sudeste
ports:
- "8882:8888"
environment:
- REGIAO=Sudeste
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://regional-sudeste:8888/healthcheck-regionais || exit 1
interval: 20s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
regional-centro-oeste:
depends_on:
- kafka
hostname: regional-centro-oeste
image: imagem-base-simulador:0.0.1
container_name: regional-centro-oeste
ports:
- "8883:8888"
environment:
- REGIAO=Centro_Oeste
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://regional-centro-oeste:8888/healthcheck-regionais || exit 1
interval: 25s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
regional-nordeste:
depends_on:
- kafka
hostname: regional-nordeste
image: imagem-base-simulador:0.0.1
container_name: regional-nordeste
ports:
- "8884:8888"
environment:
- REGIAO=Nordeste
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://regional-nordeste:8888/healthcheck-regionais || exit 1
interval: 30s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
regional-norte:
depends_on:
- kafka
hostname: regional-norte
image: imagem-base-simulador:0.0.1
container_name: regional-norte
ports:
- "8885:8888"
environment:
- REGIAO=Norte
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://regional-norte:8888/healthcheck-regionais || exit 1
interval: 35s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
motor-analise-credito:
depends_on:
- kafka
hostname: motor-analise-credito
image: imagem-base-simulador:0.0.1
container_name: motor-analise-credito
ports:
- "8889:8888"
deploy:
resources:
limits:
memory: 256MB
restart: always
healthcheck:
test: curl -f http://motor-analise-credito:8888/healthcheck-motor || exit 1
interval: 35s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
networks:
- rede-analise-credito
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 2G
restart: always
kafka:
depends_on:
- zookeeper
image: docker.io/bitnami/kafka:3.4
hostname: kafka
container_name: kafka
ports:
- "9092:9092"
- "9094:9094"
networks:
- rede-analise-credito
volumes:
- "kafka_data:/bitnami"
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_ENABLE_KRAFT=no
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 2G
restart: always
nifi:
depends_on:
- kafka
hostname: nifi
image: apache/nifi:1.19.0
container_name: nifi
ports:
- "8443:8443"
environment:
- SINGLE_USER_CREDENTIALS_USERNAME=nifi
- SINGLE_USER_CREDENTIALS_PASSWORD=mkYUQBJ9BBhc38RWa1p3E76xUR1rhYGR
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 4G
restart: on-failure
healthcheck:
test: wget -q --spider http://nifi:8443/nifi-api/system-diagnostics
interval: 60s
timeout: 40s
retries: 3
volumes:
- nifi_database:/opt/nifi/nifi-current/database_repository
- nifi_flowfile:/opt/nifi/nifi-current/flowfile_repository
- nifi_content:/opt/nifi/nifi-current/content_repository
- nifi_provenance:/opt/nifi/nifi-current/provenance_repository
- nifi_conf:/opt/nifi/nifi-current/conf
- nifi_state:/opt/nifi/nifi-current/state
- ./volumes/nifi/logs:/opt/nifi/nifi-current/logs
- ./volumes/nifi/credentials:/opt/nifi/nifi-current/credentials
- ./jdbc:/opt/nifi/nifi-current/jdbc
networks:
- rede-analise-credito
nifi-registry:
depends_on:
- nifi
hostname: nifi-registry
container_name: nifi_registry
image: apache/nifi-registry:1.19.0
ports:
- "18080:18080"
environment:
- LOG_LEVEL=INFO
- NIFI_REGISTRY_DB_DIR=/opt/nifi-registry/nifi-registry-current/database
- NIFI_REGISTRY_FLOW_PROVIDER=file
- NIFI_REGISTRY_FLOW_STORAGE_DIR=/opt/nifi-registry/nifi-registry-current/flow_storage
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 2G
restart: on-failure
healthcheck:
test: wget -q --spider http://nifi-registry:18080/nifi-registry/
interval: 60s
timeout: 40s
retries: 3
volumes:
- ./volumes/nifi_registry/database:/opt/nifi-registry/nifi-registry-current/database
- ./volumes/nifi_registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
networks:
- rede-analise-credito
sqlserver:
depends_on:
- kafka
hostname: sqlserver
container_name: sqlserver
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- "1433:1433"
environment:
- SA_PASSWORD=b90bee3b63bf33fa9901f92e
- ACCEPT_EULA=Y
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 2G
restart: always
volumes:
- ./volumes/sqlserver/sqlserver_data:/var/opt/mssql/data
- ./volumes/sqlserver/sqlserver_log:/var/opt/mssql/log
- ./volumes/sqlserver/sqlserver_secrets:/var/opt/mssql/secrets
networks:
- rede-analise-credito
minio-s3:
depends_on:
- kafka
hostname: minio-s3
container_name: minio-s3
image: bitnami/minio:2023
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=eO3RNPcKgWInlzPJuI08
- TZ=America/Sao_Paulo
deploy:
resources:
limits:
memory: 2G
restart: always
volumes:
- minio_data:/data
- minio_certs:/certs
networks:
- rede-analise-credito
streamlit:
depends_on:
- kafka
hostname: streamlit
image: imagem-base-streamlit:0.0.1
container_name: streamlit
ports:
- "19000:19000"
deploy:
resources:
limits:
memory: 2GB
restart: always
healthcheck:
test: curl -f http://streamlit:19000/ || exit 1
interval: 25s
timeout: 10s
retries: 5
networks:
- rede-analise-credito
control-center:
depends_on:
- kafka
hostname: control-center
image: confluentinc/cp-enterprise-control-center:7.3.0
container_name: control-center
ports:
- "19021:9021"
deploy:
resources:
limits:
memory: 2GB
restart: always
environment:
- CONTROL_CENTER_BOOTSTRAP_SERVERS=kafka:9092
- CONTROL_CENTER_ZOOKEEPER_CONNECT=zookeeper:2181
- CONTROL_CENTER_REPLICATION_FACTOR=1
- CONTROL_CENTER_INTERNAL_TOPICS_PARTITIONS=1
- CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS=1
- CONTROL_CENTER_COMMAND_TOPIC_PARTITIONS=1
- CONTROL_CENTER_METRICS_TOPIC_PARTITIONS=1
- PORT=9021
- TZ=America/Sao_Paulo
networks:
- rede-analise-credito
volumes:
zookeeper_data:
kafka_data:
nifi_database:
nifi_flowfile:
nifi_content:
nifi_provenance:
nifi_state:
nifi_conf:
minio_data:
minio_certs:
networks:
rede-analise-credito:
driver: bridge