-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose copy.yaml
352 lines (337 loc) · 9.03 KB
/
docker-compose copy.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
350
351
352
# SPDX-FileCopyrightText: 2024 Swiss Confederation
#
# SPDX-License-Identifier: MIT
services:
issuer:
depends_on:
db_issuer:
condition: service_healthy
build:
dockerfile: ./Dockerfile
context: ./
args:
component: issuer
poetry_dependency_groups: main,asgi,database,comms,jwt,hsm,html
install_softhsm: installit
networks:
- oid4vc_local
ports:
- 8000:443
volumes:
# Mount HSM connection
- ./softhsm2.conf:/app/softhsm2.conf
- ./cert/hsm:/app/cert/hsm
# - ./${HSM_LIBRARY}:/app/${HSM_LIBRARY}
# Cert Files
- ./cert/issuer:/app/cert
- ./issuer:/app/issuer
- ./common:/app/common
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips", "*"]
environment:
- ENABLE_DEBUG_MODE=True
- REGISTRY_BASE_URL=https://registry_base
- REGISTRY_BASE_API_KEY=${REGISTRY_BASE_API_KEY}
- REGISTRY_REVOCATION_URL=https://registry_revocation
- REGISTRY_REVOCATION_API_KEY=${REGISTRY_REVOCATION_API_KEY}
- EXTERNAL_URL=https://issuer
- API_KEY=tergum_dev_key
- DB_CONNECTION=postgresql://postgres:mysecretpassword@db_issuer/issuer
- ISSUER_ID=${ISSUER_ID} # comes from .env file
- STATUS_LIST_CONFIG=${STATUS_LIST_CONFIG}
- LOG_LEVEL=${LOG_LEVEL}
# HSM Environment Variables
- SOFTHSM2_CONF=/app/softhsm2.conf # Location where softhsm2.conf has been copied to
- HSM_LIBRARY=/usr/lib/softhsm/libsofthsm2.so # Location of HSM library in alpine
- HSM_TOKEN=${HSM_TOKEN}
- HSM_PIN=${HSM_PIN}
- HSM_LABEL=${HSM_LABEL}
- HSM_SIGNING_ALGORITHM=${HSM_SIGNING_ALGORITHM}
- APP_NAME=issuer
verifier:
depends_on:
- registry_base
- registry_revocation
build:
dockerfile: ./Dockerfile
context: ./
args:
component: verifier
poetry_dependency_groups: main,asgi,comms,jwt,redis,dif
networks:
- oid4vc_local
ports:
- 8001:443
volumes:
- ./cert/verifier:/app/cert
- ./verifier:/app/verifier
- ./common:/app/common
- ./crypto-dbpoe:/app/crypto-dbpoe:ro
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips", "*"]
environment:
- ENABLE_DEBUG_MODE=True
- REGISTRY_BASE_URL=https://registry_base/issuer
- REGISTRY_REVOCATION_URL=https://registry_revocation/issuer
- EXTERNAL_URL=https://verifier
- API_KEY=tergum_dev_key
- LOG_LEVEL=${LOG_LEVEL}
- APP_NAME=verifier
admin:
depends_on:
db_base:
condition: service_healthy
db_revocation:
condition: service_healthy
build:
dockerfile: ./Dockerfile
context: ./
args:
component: admin
poetry_dependency_groups: main,asgi,database,jwt
networks:
- oid4vc_local
ports:
- 1337:443
volumes:
- ./cert/admin:/app/cert
- ./admin:/app/admin
- ./common:/app/common
environment:
- ENABLE_DEBUG_MODE=True
- DB_CONNECTION_BASE=postgresql://postgres:mysecretpassword@db_base/registry
- DB_CONNECTION_REVOCATION=postgresql://postgres:mysecretpassword@db_revocation/registry
- API_KEY=tergum_dev_key
- LOG_LEVEL=${LOG_LEVEL}
- APP_NAME=admin
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips",
"*"
]
registry_base:
depends_on:
db_base:
condition: service_healthy
build:
dockerfile: ./Dockerfile
context: ./
args:
component: registry_base
poetry_dependency_groups: main,asgi,database,jwt
networks:
- oid4vc_local
ports:
- 8010:443
volumes:
- ./cert/registry_base:/app/cert
- ./registry_base:/app/registry_base
- ./common:/app/common
environment:
- ENABLE_DEBUG_MODE=True
- DB_CONNECTION=postgresql://postgres:mysecretpassword@db_base/registry
- LOG_LEVEL=${LOG_LEVEL}
- API_KEY=${REGISTRY_BASE_API_KEY}
- APP_NAME=registry_base
- USE_HTTPS=False
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips",
"*"
]
registry_revocation:
depends_on:
db_revocation:
condition: service_healthy
build:
dockerfile: ./Dockerfile
context: ./
args:
component: registry_revocation
poetry_dependency_groups: main,asgi,database,jwt,comms
networks:
- oid4vc_local
ports:
- 8011:443
volumes:
- ./cert/registry_revocation:/app/cert
- ./registry_revocation:/app/registry_revocation
environment:
- ENABLE_DEBUG_MODE=True
- REGISTRY_BASE_URL=https://registry_base
- DB_CONNECTION=postgresql://postgres:mysecretpassword@db_revocation/registry
- LOG_LEVEL=${LOG_LEVEL}
- API_KEY=${REGISTRY_REVOCATION_API_KEY}
- APP_NAME=registry_revocation
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips",
"*"
]
registry_identity:
depends_on:
db_identity:
condition: service_healthy
build:
dockerfile: ./Dockerfile
context: ./
args:
component: registry_identity
poetry_dependency_groups: main,asgi,database,jwt,comms
networks:
- oid4vc_local
ports:
- 8012:443
volumes:
- ./cert/registry_identity:/app/cert
- ./registry_identity:/app/registry_identity
- ./common:/app/common
environment:
- ENABLE_DEBUG_MODE=True
- DB_CONNECTION=postgresql://postgres:mysecretpassword@db_identity/registry
- LOG_LEVEL=${LOG_LEVEL}
- API_KEY=${REGISTRY_IDENTITY_API_KEY}
- APP_NAME=registry_identity
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips",
"*"
]
db_identity:
image: postgres
networks:
- oid4vc_local
ports:
- 5436:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=registry
volumes:
- registry_identity_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
db_base:
image: postgres
networks:
- oid4vc_local
ports:
- 5435:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=registry
volumes:
- registry_base_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
db_revocation:
image: postgres
networks:
- oid4vc_local
ports:
- 5433:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=registry
volumes:
- registry_revocation_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
db_issuer:
image: postgres
networks:
- oid4vc_local
ports:
- 5434:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_DB=issuer
volumes:
- issuer_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# ######################
# Web Wallet
# ######################
wallet:
build:
dockerfile: ./Dockerfile
context: ./
args:
component: wallet
poetry_dependency_groups: main,asgi,comms,jwt,html,hsm
networks:
- oid4vc_local
ports:
- 443:443
volumes:
- ./cert/wallet:/app/cert
- ./wallet/:/app/wallet
- ./common:/app/common
- ./wallet_data:/app/wallet_data:rw
environment:
- ENABLE_DEBUG_MODE=True
- APP_NAME=wallet
command:
[
"--host", "0.0.0.0",
"--port", "443",
"--reload",
"--ssl-keyfile=./cert/rsa_private.pem",
"--ssl-certfile=./cert/rsa_public.pem",
"--forwarded-allow-ips", "*"]
volumes:
registry_base_data:
registry_revocation_data:
registry_identity_data:
issuer_data:
networks:
oid4vc_local:
name: oid4vc_local