-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
executable file
·425 lines (391 loc) · 12.4 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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
version: "3"
services:
# UCI API
uci-api-service:
image: samagragovernance/uci-apis:demo-UCI
restart: always
env_file: .env
ports:
- 9999:3002
uci-api-db:
image: postgres:12
env_file: .env
restart: always
environment:
- POSTGRES_PASSWORD=${UCI_API_POSTGRES_PASSWORD}
- POSTGRES_USER=${UCI_API_POSTGRES_USER}
- POSTGRES_DB=${UCI_API_POSTGRES_DB}
volumes:
- ./data/pgdata-uci-api-db:/var/lib/postgresql/data
uci-api-db-gql:
image: hasura/graphql-engine:latest
restart: always
env_file: .env
ports:
- "15003:8080"
depends_on:
- uci-api-db
environment:
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
uci-api-scheduler-db:
image: redis:latest
env_file: .env
restart: always
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- ./data/uci-api-scheduler-db:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
# UCI PWA Adapter
uci-transport-socket:
image: samagragovernance/uci-transport-socket:v2.1.11
env_file: .env
restart: always
environment:
REDIS_HOST: ${TRANSPORT_SOCKET_CACHE_HOST}
REDIS_PORT: ${TRANSPORT_SOCKET_CACHE_PORT}
SERVER_PORT: 3005
ADAPTER_URL: "http://inbound:8085/pwa/web"
ports:
- 3005:3005
uci-web-channel:
restart: always
build:
context: ./uci-web-channel
env_file: .env
ports:
- "9098:3000"
uci-admin:
restart: always
build:
context: ./uci-admin/
args:
NG_APP_url: ${NG_APP_url}
NG_APP_nl_url: ${NG_APP_nl_url}
NG_APP_nl_login_url: ${NG_APP_nl_login_url}
NG_APP_nl_login_token: ${NG_APP_nl_login_token}
NG_APP_nl_application_id: ${NG_APP_nl_application_id}
NG_APP_blobUrl: ${NG_APP_blobUrl}
NG_APP_botPhoneNumber: ${NG_APP_botPhoneNumber}
NG_APP_adapterId: ${NG_APP_adapterId}
NG_APP_broadcastAdapterId: ${NG_APP_broadcastAdapterId}
NG_APP_userId: ${NG_APP_userId}
NG_APP_orgId: ${NG_APP_orgId}
NG_APP_token: ${NG_APP_token}
image: uci-admin
ports:
- "9097:80"
cache:
image: redis:latest
restart: always
command: ['redis-server', '--appendonly', 'yes']
hostname: redis
volumes:
- ./data/redis-data:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
# Kafka
zookeeper:
image: confluentinc/cp-zookeeper:7.3.2
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_SERVERS: zookeeper:2888:3888
restart: always
kafka:
image: confluentinc/cp-kafka:7.3.2
ports:
- "9092:9092"
- "29092:29092"
- "9998:9999"
environment:
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092,DOCKER://host.docker.internal:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_LOG_DIRS: ./data00/kafka-logs
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_JMX_PORT: 9999
KAFKA_JMX_HOSTNAME: ${DOCKER_HOST_IP:-127.0.0.1}
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
depends_on:
- zookeeper
volumes:
- ./data/kafka-data-1:/kafka
- ./data/kafka-data-2:/var/lib/kafka:Z
restart: always
schema-registry:
image: confluentinc/cp-schema-registry
restart: always
depends_on:
- kafka
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:9092'
SCHEMA_REGISTRY_HOST_NAME: 'schema-registry'
SCHEMA_REGISTRY_LISTENERS: 'http://0.0.0.0:8085'
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: 'INFO'
connect:
image: confluentinc/cp-kafka-connect
restart: always
depends_on:
- kafka
- schema-registry
environment:
CONNECT_BOOTSTRAP_SERVERS: 'kafka:9092'
CONNECT_REST_PORT: '8083'
CONNECT_REST_LISTENERS: 'http://0.0.0.0:8083'
CONNECT_REST_ADVERTISED_HOST_NAME: 'connect'
CONNECT_CONFIG_STORAGE_TOPIC: '__connect-config'
CONNECT_OFFSET_STORAGE_TOPIC: '__connect-offsets'
CONNECT_STATUS_STORAGE_TOPIC: '__connect-status'
CONNECT_GROUP_ID: 'kafka-connect'
CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: 'true'
CONNECT_KEY_CONVERTER: 'io.confluent.connect.avro.AvroConverter'
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schema-registry:8085'
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: 'true'
CONNECT_VALUE_CONVERTER: 'io.confluent.connect.avro.AvroConverter'
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: 'http://schema-registry:8085'
CONNECT_INTERNAL_KEY_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_INTERNAL_VALUE_CONVERTER: 'org.apache.kafka.connect.json.JsonConverter'
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: '1'
CONNECT_PLUGIN_PATH: ' /usr/share/java/'
# UCI Core
inbound:
image: "samagragovernance/inbound:v2.2.13"
restart: always
env_file: .env
ports:
- "0.0.0.0:${INBOUND_EXTERNAL_PORT}:${INBOUND_INTERNAL_PORT}"
orchestrator:
image: "samagragovernance/orchestrator:latest"
restart: always
env_file: .env
ports:
- "${ORCHESTRATOR_INTERNAL_PORT}:${ORCHESTRATOR_INTERNAL_PORT}"
transformer:
image: "samagragovernance/transformer:latest"
restart: always
env_file: .env
ports:
- "${TRANSFORMER_INTERNAL_PORT}:${TRANSFORMER_INTERNAL_PORT}"
outbound:
image: "samagragovernance/outbound:latest"
restart: always
env_file: .env
ports:
- "${OUTBOUND_INTERNAL_PORT}:${OUTBOUND_INTERNAL_PORT}"
broadcast-transformer:
image: "samagragovernance/broadcast-transformer:v2.2.12-SNAPSHOT"
restart: always
env_file: .env
ports:
- "${BROADCAST_TRANSFORMER_INTERNAL_PORT}:${BROADCAST_TRANSFORMER_INTERNAL_PORT}"
cdac:
image: samagragovernance/cdac-service:4.10.3
restart: always
env_file: .env-cdac
cass:
image: cassandra:latest
ports:
- 7000:7000
- 7001:7001
- 7199:7199
- 9041:9042
- 9160:9160
environment:
- JVM_OPTS=-Xmx8G -Xms1G -Xss512k
- MAX_HEAP_SIZE=8092M
- HEAP_NEWSIZE=8092M
- CASSANDRA_RPC_ADDRESS=0.0.0.0
- CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD}
restart: always
healthcheck:
test: ["CMD", "cqlsh", "-e", "describe keyspaces"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./data/cd-data:/var/lib/cassandra
- ./cassandra.yaml:/opt/cassandra/conf/cassandra.yaml
- ./init-scripts/cassandra.cql:/docker-entrypoint-initdb.d/cassandra.cql
formsdb:
restart: always
image: postgres:9.6
environment:
POSTGRES_PASSWORD: ${FORMS_DB_PASSWORD}
POSTGRES_USER: ${FORMS_DB_USERNAME}
POSTGRES_DB: ${FORMS_DB_NAME}
volumes:
- ./data/formsdb-data:/var/lib/postgresql/data
graphql-formsdb:
restart: always
image: hasura/graphql-engine:latest
ports:
- "15002:8080"
depends_on:
- formsdb
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgresql:yoursupersecret@formsdb:5432/formsdb
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${FORMSDB_HASURA_GRAPHQL_ADMIN_SECRET}
# ODK
aggregate-db:
restart: always
image: postgres:9.6-alpine
environment:
- POSTGRES_PASSWORD=${ODK_POSTGRES_PASSWORD}
- POSTGRES_USER=${ODK_POSTGRES_USER}
- POSTGRES_DB=${ODK_POSTGRES_DB}
volumes:
- ./odk-aggregate/odk/initdb:/docker-entrypoint-initdb.d
- ./data/pgdata-odk:/var/lib/postgresql/data
wait_for_db:
restart: always
image: dadarek/wait-for-dependencies
depends_on:
- aggregate-db
command: aggregate-db:5432
aggregate-server:
restart: always
depends_on:
- wait_for_db
image: tomcat:alpine
environment:
- DB_USERNAME=${ODK_POSTGRES_USER}
- DB_SCHEMA=public
- DB_PASSWORD=${ODK_POSTGRES_PASSWORD}
- DB_NAME=${ODK_POSTGRES_DB}
- DB_PORT=5432
- AGGREGATE_HOST=
- DB_URL=jdbc:postgresql://aggregate-db:5432/${ODK_POSTGRES_DB}?user=${ODK_POSTGRES_USER}&password=${ODK_POSTGRES_PASSWORD}
ports:
- 8080:8080
volumes:
- ./odk-aggregate/webapps:/usr/local/tomcat/webapps
# Fusion Auth
fa-search:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
env_file:
- .env
environment:
cluster.name: fusionauth
bootstrap.memory_lock: "true"
discovery.type: single-node
ES_JAVA_OPTS: ${ES_JAVA_OPTS}
healthcheck:
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- fa-es-data:/usr/share/elasticsearch/data
fusionauth:
image: fusionauth/fusionauth-app:latest
restart: unless-stopped
depends_on:
- fa-db
- fa-search
environment:
DATABASE_URL: jdbc:postgresql://fa-db:${FUSIONAUTH_POSTGRES_PORT}/fusionauth
DATABASE_ROOT_USERNAME: ${FUSIONAUTH_POSTGRES_USER}
DATABASE_ROOT_PASSWORD: ${FUSIONAUTH_POSTGRES_PASSWORD}
DATABASE_USERNAME: ${FUSIONAUTH_DATABASE_USER}
DATABASE_PASSWORD: ${FUSIONAUTH_DATABASE_USERNAME}
FUSIONAUTH_API_KEY: ${FUSIONAUTH_API_KEY}
FUSIONAUTH_ADMIN_EMAIL: ${FUSIONAUTH_ADMIN_EMAIL}
FUSIONAUTH_ADMIN_PASSWORD: ${FUSIONAUTH_ADMIN_PASSWORD}
FUSIONAUTH_APPLICATION_ID: ${FUSIONAUTH_APPLICATION_ID}
FUSIONAUTH_CLIENT_SECRET: ${FUSIONAUTH_CLIENT_SECRET}
FUSIONAUTH_APP_MEMORY: ${FUSIONAUTH_APP_MEMORY}
FUSIONAUTH_APP_RUNTIME_MODE: development
FUSIONAUTH_APP_URL: http://fusionauth:9011
SEARCH_SERVERS: http://fa-search:9200
SEARCH_TYPE: elasticsearch
FUSIONAUTH_APP_KICKSTART_FILE: ${FUSIONAUTH_APP_KICKSTART_FILE}
ports:
- 9011:9011
volumes:
- fa-config:/usr/local/fusionauth/config
- ./kickstart:/usr/local/fusionauth/kickstart
fa-db:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=${FUSIONAUTH_POSTGRES_USER}
- POSTGRES_PASSWORD=${FUSIONAUTH_POSTGRES_PASSWORD}
volumes:
- ./data/pgdata-fa-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
vault:
image: vault:1.10.3
restart: always
volumes:
- ./vault/vault.json:/vault/config/vault.json
- ./data/vault-data:/vault/file
environment:
- VAULT_ADDR=http://0.0.0.0:8200
- VAULT_API_ADDR=http://0.0.0.0:8200
- VAULT_ADDRESS=http://0.0.0.0:8200
cap_add:
- IPC_LOCK
command: vault server -config=/vault/config/vault.json
ports:
- 8200:8200
uci-minio:
image: quay.io/minio/minio
ports:
- "9000:9000"
- "9001:9001"
env_file: env.dev/minio.env
command: server /data --console-address ":9001"
environment:
MINIO_IDENTITY_OPENID_CLIENT_ID: ${FUSIONAUTH_APPLICATION_ID}
MINIO_IDENTITY_OPENID_CLIENT_SECRET: ${FUSIONAUTH_CLIENT_SECRET}
depends_on:
- fusionauth
akhq:
image: tchiotludo/akhq
ports:
- "18080:8080"
environment:
AKHQ_CONFIGURATION: |
akhq:
clients-defaults:
consumer:
properties:
default.api.timeout.ms: 15000000
security:
basic-auth:
- username: ${AKHQ_USERNAME}
password: ${AKHQ_PASSWORD}
groups:
- admin
connections:
docker-kafka-server:
properties:
bootstrap.servers: "kafka:19092"
schema-registry:
url: "http://schema-registry:8085"
connect:
- name: "connect"
url: "http://connect:8083"
restart: unless-stopped
volumes:
fa-config:
fa-es-data: