-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.non-bypass-acceptance.yml
More file actions
278 lines (261 loc) · 9.88 KB
/
Copy pathdocker-compose.non-bypass-acceptance.yml
File metadata and controls
278 lines (261 loc) · 9.88 KB
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
name: non-bypass-acceptance
x-proof-env: &proof-env
API_AUTH_TOKEN: ${API_AUTH_TOKEN:-runtime-secret-required}
III_LIFECYCLE_TOKEN: ${III_LIFECYCLE_TOKEN:-runtime-secret-required}
III_INGRESS_RECEIPT_SECRET: ${III_INGRESS_RECEIPT_SECRET:-runtime-secret-required}
ODP_QUERY_ADMIN_CREDENTIAL: ${ODP_QUERY_ADMIN_CREDENTIAL:-runtime-secret-required}
ODP_QUERY_CURSOR_SECRET: ${ODP_QUERY_CURSOR_SECRET:-runtime-secret-required}
DATABASE_URL: postgresql+asyncpg://proof:proof@proof-admin-postgres:5432/proof_admin
REDIS_URL: redis://proof-redis:6379/0
ODP_QUERY_URL: http://proof-odp-query:8042
III_URL: ws://proof-iii:49134
III_LIFECYCLE_URL: http://proof-relay:8080/api/v1/iii-collections/lifecycle
III_CLI_PATH: /opt/iii/iii
OIDC_ISSUER: http://proof-oidc
OIDC_AUDIENCE: proof-admin
OIDC_JWKS_URL: http://proof-oidc/jwks.json
SSL_CERT_FILE: /run/proof/ca.pem
BOOTSTRAP_ADMIN_TOKEN: ${BOOTSTRAP_ADMIN_TOKEN:-runtime-secret-required}
PROOF_PROPOSER_JWT: ${PROOF_PROPOSER_JWT:-runtime-token-required}
PROOF_REVIEWER_JWT: ${PROOF_REVIEWER_JWT:-runtime-token-required}
CONTROLLED_RECEIVER_REGISTRY_JSON: ${CONTROLLED_RECEIVER_REGISTRY_JSON:-{}}
CONTROLLED_RECEIVER_CREDENTIALS_JSON: ${CONTROLLED_RECEIVER_CREDENTIALS_JSON:-{}}
CONTROLLED_RECEIVER_INBOUND_KEYS_JSON: ${CONTROLLED_RECEIVER_INBOUND_KEYS_JSON:-{}}
CONTROLLED_RECEIVER_RECEIPT_KEYS_JSON: ${CONTROLLED_RECEIVER_RECEIPT_KEYS_JSON:-{}}
PROOF_FIXTURE_DIGEST: ${PROOF_FIXTURE_DIGEST:-runtime-digest-required}
services:
proof-admin:
build:
context: .
target: non-bypass-acceptance
environment: *proof-env
volumes:
- ${PROOF_SECRETS_DIR:-./.artifacts/non-bypass-secrets}:/run/proof:ro
networks: [proof-control, proof-query, proof-callback, proof-receiver, proof-iii-admin]
depends_on:
proof-admin-postgres: {condition: service_healthy}
proof-redis: {condition: service_healthy}
proof-odp-query: {condition: service_healthy}
proof-oidc: {condition: service_healthy}
healthcheck:
test: [CMD, curl, -fsS, http://localhost:8000/health]
interval: 5s
timeout: 3s
retries: 20
proof-driver:
build:
context: .
target: non-bypass-acceptance
entrypoint: [/bin/sh, -c]
command: [sleep infinity]
environment: *proof-env
volumes:
- ${PROOF_SECRETS_DIR:-./.artifacts/non-bypass-secrets}:/run/proof:ro
networks: [proof-control]
depends_on:
proof-admin: {condition: service_healthy}
proof-admin-postgres:
image: postgres:16-alpine@sha256:075f7ba66bc9b3ce7d6b8b635208ff61cd7cf1a67d71ec530eec5d7ae0cbe571
platform: linux/amd64
environment:
POSTGRES_DB: proof_admin
POSTGRES_USER: proof
POSTGRES_PASSWORD: proof
networks: [proof-control]
healthcheck:
test: [CMD-SHELL, pg_isready -U proof -d proof_admin]
interval: 5s
timeout: 3s
retries: 20
proof-redis:
image: redis:7-alpine@sha256:1db42ccef14898aa29bae778452d567534b59c107129cbc1163fb552de184d3c
platform: linux/amd64
networks: [proof-control, proof-odp]
healthcheck:
test: [CMD, redis-cli, ping]
interval: 5s
timeout: 3s
retries: 20
proof-iii:
image: iiidev/iii:0.19.4@sha256:14ed48b463d8a2e0d3583512acf106b3514f406c5e9965a5854710ff936e1e86
volumes:
- ./iii/config.yaml:/app/config.yaml:ro
environment:
III_EXECUTION_CONTEXT: docker
RUST_LOG: info
networks: [proof-iii-admin, proof-iii-worker]
proof-collector:
build:
context: ./iii
dockerfile: workers/collector-opencli/Dockerfile
environment:
III_URL: ws://proof-iii:49134
ODP_INGEST_URL: http://proof-odp-ingest:8040
ADMIN_III_LIFECYCLE_URL: http://proof-relay:8080/api/v1/iii-collections/lifecycle
ADMIN_III_LIFECYCLE_TOKEN: ${III_LIFECYCLE_TOKEN:-runtime-secret-required}
API_AUTH_TOKEN: ${API_AUTH_TOKEN:-runtime-secret-required}
OPENCLI_BIN: /tmp/opencli-proof
OPENCLI_MODE: bridge
command: [/bin/sh, -ec, "install -m 0555 /proof/opencli-proof /tmp/opencli-proof && exec python worker/src/main.py"]
volumes:
- ./tests/acceptance/fixtures/opencli-proof:/proof/opencli-proof:ro
networks: [proof-iii-worker]
depends_on:
proof-iii: {condition: service_started}
proof-relay: {condition: service_healthy}
proof-odp-ingest: {condition: service_healthy}
proof-bridge:
build:
context: ./iii
dockerfile: workers/odp-ingest-bridge/Dockerfile
environment:
III_URL: ws://proof-iii:49134
ODP_INGEST_URL: http://proof-odp-ingest:8040
ADMIN_III_LIFECYCLE_URL: http://proof-relay:8080/api/v1/iii-collections/lifecycle
ADMIN_III_LIFECYCLE_TOKEN: ${III_LIFECYCLE_TOKEN:-runtime-secret-required}
API_AUTH_TOKEN: ${API_AUTH_TOKEN:-runtime-secret-required}
networks: [proof-iii-worker, proof-odp]
depends_on:
proof-iii: {condition: service_started}
proof-relay: {condition: service_healthy}
proof-odp-ingest: {condition: service_healthy}
proof-relay:
depends_on:
proof-admin: {condition: service_started}
image: nginx:1.27-alpine@sha256:62223d644fa234c3a1cc785ee14242ec47a77364226f1c811d2f669f96dc2ac8
platform: linux/amd64
volumes:
- ./tests/acceptance/fixtures/non-bypass-relay.conf:/etc/nginx/conf.d/default.conf:ro
networks: [proof-control, proof-callback, proof-iii-worker]
healthcheck:
test: [CMD-SHELL, nginx -t]
interval: 5s
timeout: 3s
retries: 20
proof-odp-ingest:
build:
context: ./odp-rs
dockerfile: Dockerfile.ingest
environment:
ODP_INGEST_HOST: 0.0.0.0
ODP_INGEST_PORT: 8040
ODP_REDIS_URL: redis://proof-redis:6379/2
ODP_INGRESS_RECEIPT_SECRET: ${III_INGRESS_RECEIPT_SECRET:-runtime-secret-required}
networks: [proof-odp]
depends_on:
proof-redis: {condition: service_healthy}
healthcheck:
test: [CMD, curl, -fsS, http://localhost:8040/health]
interval: 5s
timeout: 3s
retries: 20
proof-odp-store:
build:
context: ./odp-rs
dockerfile: Dockerfile.store
environment:
ODP_REDIS_URL: redis://proof-redis:6379/2
ODP_DATABASE_URL: postgresql://proof:proof@proof-odp-postgres:5432/proof_odp
networks: [proof-odp]
depends_on:
proof-odp-ingest: {condition: service_healthy}
proof-odp-postgres: {condition: service_healthy}
healthcheck:
test: [CMD-SHELL, pgrep -x odp-store]
interval: 5s
timeout: 3s
retries: 20
proof-odp-query:
build:
context: ./odp-rs
dockerfile: Dockerfile.query
environment:
ODP_QUERY_HOST: 0.0.0.0
ODP_QUERY_PORT: 8042
ODP_QUERY_DATABASE_URL: postgresql://proof:proof@proof-odp-postgres:5432/proof_odp
ODP_QUERY_ADMIN_CREDENTIAL: ${ODP_QUERY_ADMIN_CREDENTIAL:-runtime-secret-required}
ODP_QUERY_CURSOR_SECRET: ${ODP_QUERY_CURSOR_SECRET:-runtime-secret-required}
networks: [proof-odp, proof-query]
depends_on:
proof-odp-store: {condition: service_healthy}
proof-odp-postgres: {condition: service_healthy}
healthcheck:
test: [CMD, curl, -fsS, http://localhost:8042/health]
interval: 5s
timeout: 3s
retries: 20
proof-odp-postgres:
image: postgres:16-alpine@sha256:075f7ba66bc9b3ce7d6b8b635208ff61cd7cf1a67d71ec530eec5d7ae0cbe571
platform: linux/amd64
environment:
POSTGRES_DB: proof_odp
POSTGRES_USER: proof
POSTGRES_PASSWORD: proof
networks: [proof-odp]
healthcheck:
test: [CMD-SHELL, pg_isready -U proof -d proof_odp]
interval: 5s
timeout: 3s
retries: 20
proof-oidc:
image: nginx:1.27-alpine@sha256:62223d644fa234c3a1cc785ee14242ec47a77364226f1c811d2f669f96dc2ac8
platform: linux/amd64
volumes:
- ${PROOF_SECRETS_DIR:-./.artifacts/non-bypass-secrets}/jwks.json:/usr/share/nginx/html/jwks.json:ro
networks: [proof-control]
healthcheck:
test: [CMD-SHELL, wget -q -O - http://localhost/jwks.json | grep -q '"keys"']
interval: 5s
timeout: 3s
retries: 20
proof-controlled-receiver:
build:
context: .
target: non-bypass-acceptance
command: [uvicorn, backend.main:app, --host, 0.0.0.0, --port, "8000", --ssl-keyfile, /run/proof/receiver-key.pem, --ssl-certfile, /run/proof/receiver-cert.pem]
environment:
DATABASE_URL: postgresql+asyncpg://proof:proof@proof-receiver-postgres:5432/proof_receiver
API_AUTH_TOKEN: ${API_AUTH_TOKEN:-runtime-secret-required}
CONTROLLED_RECEIVER_REGISTRY_JSON: ${CONTROLLED_RECEIVER_REGISTRY_JSON:-{}}
CONTROLLED_RECEIVER_CREDENTIALS_JSON: ${CONTROLLED_RECEIVER_CREDENTIALS_JSON:-{}}
CONTROLLED_RECEIVER_INBOUND_KEYS_JSON: ${CONTROLLED_RECEIVER_INBOUND_KEYS_JSON:-{}}
CONTROLLED_RECEIVER_RECEIPT_KEYS_JSON: ${CONTROLLED_RECEIVER_RECEIPT_KEYS_JSON:-{}}
SSL_CERT_FILE: /run/proof/ca.pem
volumes:
- ${PROOF_SECRETS_DIR:-./.artifacts/non-bypass-secrets}:/run/proof:ro
networks:
proof-receiver:
ipv4_address: 8.8.8.8
depends_on:
proof-receiver-postgres: {condition: service_healthy}
healthcheck:
test: [CMD, curl, -fsS, https://localhost:8000/health, -k]
interval: 5s
timeout: 3s
retries: 20
proof-receiver-postgres:
image: postgres:16-alpine@sha256:075f7ba66bc9b3ce7d6b8b635208ff61cd7cf1a67d71ec530eec5d7ae0cbe571
platform: linux/amd64
environment:
POSTGRES_DB: proof_receiver
POSTGRES_USER: proof
POSTGRES_PASSWORD: proof
networks: [proof-receiver]
depends_on: []
healthcheck:
test: [CMD-SHELL, pg_isready -U proof -d proof_receiver]
interval: 5s
timeout: 3s
retries: 20
networks:
proof-control: {internal: true}
proof-iii-admin: {internal: true}
proof-iii-worker: {internal: true}
proof-odp: {internal: true}
proof-query: {internal: true}
proof-callback: {internal: true}
proof-receiver:
internal: true
ipam:
config:
- subnet: 8.8.8.0/24