forked from Sunbird-RC/demo-donor-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
378 lines (377 loc) · 12.7 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
version: "2.4"
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- ELASTIC_PASSWORD=${ELASTIC_SEARCH_PASSWORD}
- xpack.security.enabled=${ELASTIC_SECURITY_ENABLED-false}
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:9200/_cluster/health", "--header", "Authorization: Basic ZWxhc3RpYzpEa0llZFBQU0Ni" ]
interval: 30s
timeout: 10s
retries: 4
db:
image: postgres
volumes:
- ./${DB_DIR-db-data}:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_DB=registry
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
registry:
image: dockerhub/sunbird-rc-core:v0.0.14
volumes:
- ${PWD}/${SCHEMA_DIR-java/registry/src/main/resources/public/_schemas}:/home/sunbirdrc/config/public/_schemas
environment:
- connectionInfo_uri=jdbc:postgresql://db:5432/registry
- connectionInfo_username=postgres
- connectionInfo_password=postgres
- elastic_search_connection_url=es:9200
- elastic_search_auth_enabled=${ELASTIC_SECURITY_ENABLED-false}
- elastic_search_username=${ELASTIC_SEARCH_USERNAME-elastic}
- elastic_search_password=${ELASTIC_SEARCH_PASSWORD}
- search_providerName=${SEARCH_PROVIDER_NAME-dev.sunbirdrc.registry.service.ElasticSearchService}
- sunbird_sso_realm=${KEYCLOAK_REALM-sunbird-rc}
- sunbird_sso_url=http://keycloak:8080/auth
- sunbird_sso_admin_client_id=${KEYCLOAK_ADMIN_CLIENT_ID-admin-api}
- sunbird_sso_client_id=${KEYCLOAK_CLIENT_ID-registry-frontend}
- sunbird_sso_admin_client_secret=${KEYCLOAK_SECRET}
- claims_url=http://claim-ms:8082
- sign_url=http://certificate-signer:8079/sign
- verify_url=http://certificate-signer:8079/verify
- sign_health_check_url=http://certificate-signer:8079/health
- signature_enabled=true
- pdf_url=http://certificate-pdf:8003/api/v1/certificatePDF
- certificate_health_check_url=http://certificate-api:8078/health
- template_base_url=http://registry:8081/api/v1/templates/ #Looks for certificate templates for pdf copy of the signed certificate
- sunbird_keycloak_user_set_password=true
- filestorage_connection_url=http://file-storage:9000
- filestorage_access_key=admin
- filestorage_secret_key=12345678
- filestorage_bucket_key=issuance
- registry_base_apis_enable=false
- sunbird_keycloak_user_password=abcd@123
- logging.level.root=INFO
- enable_external_templates=true
- async_enabled=${ASYNC_ENABLED-false}
- authentication_enabled=true
- kafka_bootstrap_address=kafka:9092
- webhook_enabled=false
- webhook_url=http://localhost:5001/api/v1/callback
- redis_host=redis
- redis_port=6379
- manager_type=${MANAGER_TYPE-DefinitionsManager}
- external_entities=nha-admin
- invite_required_validation_enabled=false
- invite_signature_enabled=false
- event_enabled=${ENABLE_METRICS_SERVICE-false}
- event_topic=${METRICS_TOPIC-events}
- event_providerName=dev.sunbirdrc.registry.service.impl.KafkaEventService
ports:
- "8081:8081"
depends_on:
es:
condition: service_healthy
db:
condition: service_healthy
kafka:
condition: service_started
healthcheck:
test: [ "CMD-SHELL", "wget -nv -t1 --spider http://localhost:8081/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 10
keycloak:
image: varadeth/sunbird-rc-keycloak:v0.0.13-4
volumes:
- ${PWD}/${KEYCLOAK_IMPORT_DIR-imports}:/opt/jboss/keycloak/imports
- ${PWD}/${KEYCLOAK_THEMES_DIR-keycloak/themes/nha}:/opt/jboss/keycloak/themes/nha
environment:
- KEYCLOAK_LOGO=https://raw.githubusercontent.com/Sunbird-RC/demo-donor-registry/main/imports/header_logo.svg
- DB_VENDOR=postgres
- DB_ADDR=db
- DB_PORT=5432
- DB_DATABASE=registry
- DB_USER=postgres
- DB_PASSWORD=postgres
- KEYCLOAK_USER=${KEYCLOAK_ADMIN_USER-admin}
- KEYCLOAK_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD-admin}
- KEYCLOAK_IMPORT=/opt/jboss/keycloak/imports/realm-export.json
- PROXY_ADDRESS_FORWARDING=true
- KEYCLOAK_PORTAL_TITLE=
- KEYCLOAK_PORTAL_SUB_TITLE=
- SIGN_UP_LINK=/form/signup
- SHOW_FOOTER=false
- SHOW_BANNER=false
- LOGIN_USER_ID_TITLE=ABHA Number / Mobile Number
- MOCK_OTP=false
- MESSAGE_TEMPLATE=${MESSAGE_TEMPLATE}
- NOTIFICATION_SERVICE_URL=http://notification-ms:8765/notification-service/v1/notification
- REGISTER_URL=${REGISTER_URL}
- INVALID_REGISTRATION=${INVALID_REGISTRATION}
- INVALID_USERNAME=${INVALID_USERNAME}
- VALID_OTP=${VALID_OTP}
- OTP_MAX_RETRY_LIMIT=${OTP_MAX_RETRY_LIMIT}
- MAX_RETRIES_LIMIT_MESSAGE=${MAX_RETRIES_LIMIT_MESSAGE}
- MAX_RESEND_TRIES=${MAX_RESEND_TRIES}
healthcheck:
test:
["CMD-SHELL", "curl -f http://localhost:9990/ || exit 1"]
interval: 30s
timeout: 10s
retries: 10
ports:
- "8080:8080"
- "9990:9990"
depends_on:
db:
condition: service_healthy
claim-ms:
image: dockerhub/sunbird-rc-claim-ms:${RELEASE_VERSION}
environment:
- connectionInfo_uri=jdbc:postgresql://db:5432/registry
- connectionInfo_username=postgres
- connectionInfo_password=postgres
- sunbirdrc_url=http://registry:8081
ports:
- "8082:8082"
depends_on:
db:
condition: service_started
registry:
condition: service_started
healthcheck:
test: [ "CMD-SHELL", "wget -nv -t1 --spider http://localhost:8082/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 10
certificate-signer:
image: dockerhub/sunbird-rc-certificate-signer:${RELEASE_VERSION}
environment:
- PORT=8079
- TIME_ZONE=${TIME_ZONE-Asia/Kolkata}
ports:
- "8079:8079"
volumes:
- ./imports:/etc/signer
healthcheck:
test:
[ "CMD-SHELL", "curl -f http://localhost:8079/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 10
certificate-api:
image: tejashjl/sunbird-rc-certificate-api:v0.0.13-1
environment:
- PORT=8078
- QR_TYPE=URL
- CERTIFICATE_DOMAIN_URL=${CERTIFICATE_DOMAIN_URL}
ports:
- "8078:8078"
healthcheck:
test:
[ "CMD-SHELL", "wget -nv -t1 --spider http://localhost:8078/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 10
file-storage:
image: quay.io/minio/minio
volumes:
- ${HOME}/minio/data:/data
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=12345678
command: server --address 0.0.0.0:9000 --console-address 0.0.0.0:9001 /data
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 10
notification-ms:
build: backend/notification-service
ports:
- "8765:8765"
environment:
- KAFKA_ENABLED=false
- SMPP_ENTITY_ID=${SMPP_ENTITY_ID}
- SMPP_PASSWORD=${SMPP_PASSWORD}
- SMPP_SOURCE=${SMPP_SOURCE}
- SMPP_USER_NAME=${SMPP_USER_NAME}
- SMS_URL=${SMS_URL}
- ENABLE_SMS=true
- ENABLE_EMAIL=false
healthcheck:
test:
[ "CMD-SHELL", "wget -nv -t1 --spider http://localhost:8765/notification-service/v1/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 10
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
ZOOKEEPER_TICK_TIME: "2000"
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
zookeeper:
condition: service_started
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: "1"
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka:9092,OUTSIDE://localhost:9094"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
healthcheck:
test:
[ "CMD", "kafka-topics", "--list", "--zookeeper", "zookeeper:2181" ]
interval: 30s
timeout: 10s
retries: 10
metrics:
image: dockerhub/sunbird-rc-metrics
environment:
CLICK_HOUSE_URL: clickhouse:9000
CLICKHOUSE_DATABASE: default
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_METRICS_TOPIC: ${METRICS_TOPIC-events}
REDIS_URL: redis:6379
ports:
- "8070:8070"
depends_on:
kafka:
condition: service_started
registry:
condition: service_healthy
clickhouse:
image: clickhouse/clickhouse-server:head-alpine
volumes:
- ./${ClickHosue_DIR-ch-data}:/var/lib/clickhouse
- ${PWD}/${SCHEMA_DIR-java/registry/src/main/resources/public/_schemas}:/app/schemas
ports:
- "9002:9000"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1
public-key-service:
image: dockerhub/sunbird-rc-public-key-service
environment:
- CONFIG_BASE_PATH=/etc/keys
ports:
- "3300:3300"
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:3300/public-key-service/api/v1/health" ]
interval: 30s
timeout: 10s
retries: 10
volumes:
- ./imports:/etc/keys
context-proxy-service:
image: dockerhub/sunbird-rc-context-proxy-service
ports:
- "4400:4400"
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:4400/health" ]
interval: 30s
timeout: 10s
retries: 10
nginx:
image: tejashjl/sunbird-rc-donor-portal:${PORTAL_RELEASE_VERSION}
ports:
- "80:80"
depends_on:
registry:
condition: service_healthy
context-proxy-service:
condition: service_started
public-key-service:
condition: service_started
keycloak:
condition: service_started
claim-ms:
condition: service_started
file-storage:
condition: service_started
donor-service:
condition: service_started
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:80" ]
interval: 30s
timeout: 10s
retries: 10
redis:
image: redis:latest
ports:
- "6379:6379"
certificate-pdf:
build: backend/certificate-pdf-service
ports:
- "8003:8003"
donor-service:
build: backend/donor-service
volumes:
- ${PWD}/${SCHEMA_DIR-java/registry/src/main/resources/public/_schemas}:/app/schemas
ports:
- "3000:3000"
healthcheck:
test: [ "CMD", "curl", "-f", "localhost:3000/api-docs" ]
interval: 30s
timeout: 10s
retries: 10
depends_on:
redis:
condition: service_started
environment:
REDIS_URL: ${REDIS_URL}
REGISTRY_URL: ${REGISTRY_URL}
CERTIFICATE_API_URL: http://certificate-api:8078
ABHA_CLIENT_URL: ${ABHA_CLIENT_URL}
CLIENT_ID: ${CLIENT_ID}
CLIENT_SECRET: ${CLIENT_SECRET}
BASE_URL: ${BASE_URL}
SERVICE_ACCOUNT_CLIENT_SECRET: ${SERVICE_ACCOUNT_CLIENT_SECRET}
KEYCLOAK_URL: ${KEYCLOAK_URL}
EXPIRE_PROFILE: ${EXPIRE_PROFILE}
ESIGN_ESP_URL: ${ESIGN_ESP_URL}
ESIGN_ESP_PDF_URL: ${ESIGN_ESP_PDF_URL}
ESIGN_FORM_SIGN_URL: ${ESIGN_FORM_SIGN_URL}
ESIGN_FORM_REPLACE_URL: ${ESIGN_FORM_REPLACE_URL}
PORTAL_PLEDGE_REGISTER_URL: ${PORTAL_PLEDGE_REGISTER_URL}
LOG_LEVEL: ${LOG_LEVEL}
NUMBER_OF_DIGITS: ${NUMBER_OF_DIGITS}
UNIQUE_ABHA_ENABLED: ${UNIQUE_ABHA_ENABLED}
NOTIFICATION_SERVICE_URL: http://notification-ms:8765/notification-service/v1/notification
LOGIN_LINK: ${LOGIN_LINK}
INVITE_TEMPLATE_ID: ${INVITE_TEMPLATE_ID}
NOTIFY_TEMPLATE_ID: ${NOTIFY_TEMPLATE_ID}
UPDATE_TEMPLATE_ID: ${UPDATE_TEMPLATE_ID}
UNPLEDGE_TEMPLATE_ID: ${UNPLEDGE_TEMPLATE_ID}
API_KEY: ${API_KEY}
ESIGN_VALIDATION_PREVENT_3RD_PARTY: ${ESIGN_VALIDATION_PREVENT_3RD_PARTY}
ESIGN_VALIDATION_EXPIRE_TIME: ${ESIGN_VALIDATION_EXPIRE_TIME}
ESIGN_VALIDATION_CLIENT_ID: ${ESIGN_VALIDATION_CLIENT_ID}
ESIGN_VALIDATION_KAFKA_BROKERS: ${ESIGN_VALIDATION_KAFKA_BROKERS}
ESIGN_VALIDATION_KAFKA_TOPIC: ${ESIGN_VALIDATION_KAFKA_TOPIC}
ESIGN_VALIDATION_KAFKA_TOPIC_GROUP: ${ESIGN_VALIDATION_KAFKA_TOPIC_GROUP}
METRICS_URL: ${METRICS_URL}
KAFKA_BROKER_FOR_METRICS_SERVICE: ${KAFKA_BROKER_FOR_METRICS_SERVICE}
METRICS_TOPIC: ${METRICS_TOPIC}