-
Notifications
You must be signed in to change notification settings - Fork 205
/
docker-compose-vc-issuance.yml
252 lines (246 loc) · 10.2 KB
/
docker-compose-vc-issuance.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
version: "2.4"
services:
# External Dependencies
redis:
image: redis
ports:
- "6379:6379"
db:
image: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_DB=registry
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
vc-registry:
image: dockerhub/sunbird-rc-core:v0.0.13
volumes:
- ./vc-registry:/home/sunbirdrc/config/public/_schemas
environment:
- connectionInfo_uri=jdbc:postgresql://db:5432/registry
- connectionInfo_username=postgres
- connectionInfo_password=postgres
- sunbird_sso_realm=sunbird-rc
- sunbird_sso_url=${KEYCLOAK_URL}/auth
- sunbird_sso_admin_client_id=admin-api
- sunbird_sso_client_id=registry-frontend
- sunbird_sso_admin_client_secret=0358fa30-6014-4192-9551-7c61b15b774c
- sign_url=http://sunbird-certificate-signer:8079/sign
- verify_url=http://sunbird-certificate-signer:8079/verify
- signature_enabled=true
- pdf_url=http://sunbird-certificate-api:8078/api/v1/certificatePDF
- template_base_url=http://vc-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
# - filestorage_connection_url=https://s3.amazonaws.com/
# - filestorage_access_key=AKIAZ4W766BK5Z3WC65T
# - filestorage_secret_key=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
# - filestorage_bucket_key=divoc-vc-storage
- registry_base_apis_enable=false
- sunbird_keycloak_user_password=abcd@123
- logging.level.root=DEBUG
- enable_external_templates=true
- authentication_enabled=true
- async_enabled=$ASYNC_ENABLED
- kafka_bootstrap_address=kafka:9092
ports:
- "8081:8081"
depends_on:
db:
condition: service_started
keycloak:
condition: service_started
sunbird-certificate-signer:
image: dockerhub/sunbird-rc-certificate-signer:v0.0.9-1
environment:
PORT: 8079
CERTIFICATE_NAMESPACE: "https://sunbird.org/credentials/vaccination/v1"
CERTIFICATE_CONTROLLER_ID: "https://sunbird.org/"
CERTIFICATE_PUBKEY_ID: "https://example.com/i/india"
CERTIFICATE_DID: "did:india"
CERTIFICATE_ISSUER: "https://sunbird.org/"
SIGNING_KEY_TYPE: "RSA"
CERTIFICATE_PUBLIC_KEY: |
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnXQalrgztecTpc+INjRQ8s73FSE1kU5QSlwBdICCVJBUKiuQUt7s+Z5epgCvLVAOCbP1mm5lV7bfgV/iYWDio7lzX4MlJwDedWLiufr3Ajq+79CQiqPaIbZTo0i13zijKtX7wgxQ78wT/HkJRLkFpmGeK3za21tEfttytkhmJYlwaDTEc+Kx3RJqVhVh/dfwJGeuV4Xc/e2NH++ht0ENGuTk44KpQ+pwQVqtW7lmbDZQJoOJ7HYmmoKGJ0qt2hrj15uwcD1WEYfY5N7N0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2nREnd4mYP8kNKzJa9L7zj6Un6yLH5DbGspZ2gGODeRw3uVFN8XSzRdLvllNEyiG/waiysUtXfG2DPOR6xD8tXXDMm/tl9gTa8cbkvqYy10XT9MpfOAsusEZVmc0/DBBMsCgYAYdAxoKjnThPuHwWma5BrIjUnxNaTADWp6iWj+EYnjylE9vmlYNvmZn1mWwSJV5Ce2QwQ0KJIXURhcf5W4MypeTfSase3mxLc1TLOO2naAbYY3GL3xnLLK3DlUsZ9+kes3BOD097UZOFG3DIA8sjDxPxTLCoY6ibBFSa/r4GRIMQKBgQCranDCgPu79RHLDVBXM0fKnj2xQXbd/hqjDmcL+Xnx7E7S6OYTXyBENX1qwVQh9ESDi34cBJVPrsSME4WVT3+PreS0CnSQDDMfr/m9ywkTnejYMdgJHOvtDuHSpJlUk3g+vxnm3H0+E5d+trhdGiOjFnLrwyWkd5OTMqWcEEFQkQKBgFfXObDz/7KqeSaAxI8RzXWbI3Fa492b4qQUhbKYVpGn98CCVEFJr11vuB/8AXYCa92OtbwgMw6Ah5JOGzRScJKdipoxo7oc2LJ9sSjjw3RB/aWl35ChvnCJhmfSL8Usbj0nWVTrPwRLjMC2bIxkLtnm9qYXPumW1EjEbusjVMpN
-----END RSA PRIVATE KEY-----
ports:
- "6079:8079"
volumes:
- ./imports:/etc/signer
sunbird-certificate-api:
image: dockerhub/sunbird-rc-certificate-api:v0.0.9
volumes:
- ./scripts:/scripts
entrypoint: ["sh", "/scripts/docker-entrypoint.sh"]
environment:
- PORT=8078
ports:
- "6078:8078"
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:
- "6000:9000"
- "6001:9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
keycloak:
image: divoc/keycloak:3.5.0-generic
volumes:
- ./keycloak:/opt/jboss/keycloak/imports
environment:
DB_VENDOR: postgres
DB_ADDR: db
DB_PORT: 5432
DB_DATABASE: registry
DB_USER: postgres
DB_PASSWORD: postgres
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
ENABLE_SEND_OTP: $ENABLE_SEND_OTP
COUNTRY_CALLING_CODE: $COUNTRY_CALLING_CODE
IS_COUNTRY_CODE_PREFIXED: $IS_COUNTRY_CODE_PREFIXED
KEYCLOAK_IMPORT: /opt/jboss/keycloak/imports/src-realm-export.json
PROXY_ADDRESS_FORWARDING: "true"
JAVA_OPTS: -Dkeycloak.profile.feature.token_exchange=enabled
# - ./keycloak-mobile-number-login-spi/themes:/opt/jboss/keycloak/themes/
healthcheck:
test:
["CMD-SHELL", "curl -f http://localhost:9990/ || exit 1"]
interval: 30s
timeout: 10s
retries: 5
ports:
- "8080:8080"
- "9990:9990"
depends_on:
db:
condition: service_started
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
ZOOKEEPER_TICK_TIME: "2000"
kafka:
image: confluentinc/cp-kafka:5.2.5-10
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: 4
# VC Issuance as a platform
vc-certification-service:
image: divoc/vc-certification-service:3.5.0-generic
ports:
- "7654:7654"
environment:
SUNBIRD_REGISTRY_URL: "http://vc-registry:8081"
SUNBIRD_SIGNER_URL: "http://sunbird-certificate-signer:8079"
PORT: "7654"
KEYCLOAK_URL: "$KEYCLOAK_URL"
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
VC_CERTIFY_TOPIC: 'vc-certify'
VC_REMOVE_SUSPENSION_TOPIC: 'vc-remove-suspension'
SUNBIRD_SSO_CLIENT: 'admin-api'
SUNBIRD_SSO_ADMIN_CLIENT_SECRET: '0358fa30-6014-4192-9551-7c61b15b774c'
SUSPENSION_REMOVAL_SCHEDULE: '0 0 * * *'
depends_on:
vc-registry:
condition: service_started
vc-management-service:
image: divoc/vc-management-service:3.5.0-generic
ports:
- "7655:7655"
environment:
SUNBIRD_REGISTRY_URL: "http://vc-registry:8081"
MINIO_URL: "file-storage"
MINIO_PORT: "9000"
MINIO_USESSL: 'false'
MINIO_ACCESSKEY: 'admin'
MINIO_SECRETKEY: '12345678'
# MINIO_URL: "s3.amazonaws.com"
# MINIO_USESSL: 'true'
# MINIO_ACCESSKEY: 'AKIAZ4W766BK5Z3WC65T'
# MINIO_SECRETKEY: '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'
MINIO_BUCKET_NAME: 'divoc-vc-storage'
MINIO_REGISTRY_BUCKET: 'issuance'
ROOT_URL: ''
REDIS_ENABLED: 'true'
REDIS_URL: 'redis://redis:6379'
IS_MINIO: 'true'
PORT: "7655"
KEYCLOAK_URL: "$KEYCLOAK_URL"
SUNBIRD_SSO_CLIENT: 'admin-api'
SUNBIRD_SSO_ADMIN_CLIENT_SECRET: '0358fa30-6014-4192-9551-7c61b15b774c'
IS_CLOUD_STORAGE: 'false'
STORAGE_REGION: 'us-east-1'
SUNBIRD_REGISTRY_FRONTEND_CLIENT: 'registry-frontend'
KEYCLOCK_TOKEN_TYPE_REFRESH_TOKEN: 'urn:ietf:params:oauth:token-type:refresh_token'
KEYCLOCK_GRANT_TYPE_TOKEN_EXCHANGE: 'urn:ietf:params:oauth:grant-type:token-exchange'
SUNBIRD_CERIFICATE_SIGNER_URL: 'http://sunbird-certificate-signer:8079'
SUNBIRD_CERIFICATE_API_URL: 'http://sunbird-certificate-api:8078'
depends_on:
vc-registry:
condition: service_started
# Gateway as a Proxy for forwarding ports
gateway:
image: divoc/vc-gateway:3.5.0-generic
ports:
- "80:80"
depends_on:
vc-management-service:
condition: service_started
vc-certification-service:
condition: service_started
tenant-portal:
image: divoc/vc-tenant-portal:3.5.0-generic
verification-app:
image: divoc/vc-verification-webapp:3.5.0-generic
vc-certify-consumer:
image: divoc/vc-certify-consumer:3.5.0-generic
environment:
SUNBIRD_REGISTRY_URL: "http://vc-registry:8081"
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
VC_CERTIFY_TOPIC: 'vc-certify'
POST_VC_CERTIFY_TOPIC: 'post-vc-certify'
VC_CERTIFICATION_SERVICE_URL: "http://vc-certification-service:7654"
REDIS_ENABLED: 'true'
REDIS_URL: 'redis://redis:6379'
depends_on:
vc-registry:
condition: service_started
kafka:
condition: service_healthy