forked from hyperledger-labs/business-partner-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
159 lines (158 loc) · 5.67 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
version: "3.9"
services:
#######
# Business Partner 1
#######
bpa1:
image: ghcr.io/hyperledger-labs/business-partner-agent:edge
depends_on:
- bpa-agent1
environment:
JAVA_OPTS: >
-Dbpa.acapy.url=http://bpa-agent1:${ACAPY_ADMIN_PORT}
-Dbpa.acapy.apiKey=${ACAPY_ADMIN_URL_API_KEY}
-Dmicronaut.security.enabled=${BPA_SECURITY_ENABLED}
-Dmicronaut.server.port=${BPA_PORT}
-Dmicronaut.config.files=${BPA_CONFIG_FILES}
-Dbpa.pg.url=jdbc:postgresql://${POSTGRESQL_HOST}/${POSTGRESQL_USER}
-Dbpa.pg.username=${POSTGRESQL_USER}
-Dbpa.pg.password=${POSTGRESQL_PASSWORD}
-Dbpa.host=${BPA_HOST}
-Dbpa.scheme=${BPA_SCHEME}
BPA_WEB_MODE: ${BPA_WEB_MODE}
BPA_LEDGER_BROWSER: ${BPA_LEDGER_BROWSER}
BPA_BOOTSTRAP_UN: ${BPA_BOOTSTRAP_UN}
BPA_BOOTSTRAP_PW: ${BPA_BOOTSTRAP_PW}
ACAPY_ENDPOINT: ${ACAPY_ENDPOINT}
AGENT_NAME: ${AGENT_NAME}
BPA_IMPRINT_URL: ${BPA_IMPRINT_URL}
BPA_PRIVACY_POLICY_URL: ${BPA_PRIVACY_POLICY_URL}
BPA_CREDDEF_REVOCATION_REGISTRY_SIZE: ${BPA_CREDDEF_REVOCATION_REGISTRY_SIZE}
ports:
- ${BPA_PORT}:${BPA_PORT}
restart: always
bpa-agent1:
image: bcgovimages/aries-cloudagent:py36-1.16-0_0.7-pre.3
ports:
- ${ACAPY_ADMIN_PORT}:${ACAPY_ADMIN_PORT}
- ${ACAPY_HTTP_PORT}:${ACAPY_HTTP_PORT}
depends_on:
- bpa-wallet-db1
entrypoint: /bin/bash
command: [
"-c",
"sleep 15;
aca-py start \
--auto-provision
--arg-file acapy-static-args.yml \
--inbound-transport http '0.0.0.0' ${ACAPY_HTTP_PORT} \
--webhook-url '${BPA_WEBHOOK_URL}' \
--genesis-url '${ACAPY_GENESIS_URL}' \
--endpoint ${ACAPY_ENDPOINT} \
--wallet-name '${ACAPY_WALLET_DATABASE}' \
--wallet-key '${ACAPY_WALLET_ENCRYPTION_KEY}' \
--wallet-storage-type '${ACAPY_WALLET_TYPE}' \
--wallet-storage-config '{\"url\":\"${POSTGRESQL_HOST}:5432\",\"max_connections\":5}' \
--wallet-storage-creds '{\"account\":\"${POSTGRESQL_USER}\",\"password\":\"${POSTGRESQL_PASSWORD}\",\"admin_account\":\"${POSTGRESQL_USER}\",\"admin_password\":\"${POSTGRESQL_PASSWORD}\"}' \
--seed '${ACAPY_SEED}' \
--admin '0.0.0.0' ${ACAPY_ADMIN_PORT} \
--label '${AGENT_NAME}' \
${ACAPY_ADMIN_CONFIG} \
${ACAPY_READ_ONLY_MODE} \
"
]
volumes:
- "./acapy-static-args.yml:/home/indy/acapy-static-args.yml"
bpa-wallet-db1:
image: "postgres:12-alpine"
environment:
- POSTGRES_USER=${POSTGRESQL_USER}
- POSTGRES_PASSWORD=${POSTGRESQL_PASSWORD}
ports:
- ${POSTGRESQL1_PORT}:5432
volumes:
- bpa-wallet-db1:/var/lib/postgresql/data
#######
# Business Partner 2 (only started with "--profile second_bpa")
#######
bpa2:
profiles:
- second_bpa
image: ghcr.io/hyperledger-labs/business-partner-agent:edge
depends_on:
- bpa-agent2
environment:
JAVA_OPTS: >
-Dbpa.acapy.url=http://bpa-agent2:${ACAPY2_ADMIN_PORT}
-Dbpa.acapy.apiKey=${ACAPY_ADMIN_URL_API_KEY}
-Dmicronaut.security.enabled=${BPA_SECURITY_ENABLED}
-Dmicronaut.server.port=${BPA2_PORT}
-Dmicronaut.config.files=${BPA_CONFIG_FILES}
-Dbpa.pg.url=jdbc:postgresql://${POSTGRESQL2_HOST}/${POSTGRESQL_USER}
-Dbpa.pg.username=${POSTGRESQL_USER}
-Dbpa.pg.password=${POSTGRESQL_PASSWORD}
-Dbpa.host=${BPA2_HOST}
-Dbpa.scheme=${BPA_SCHEME}
BPA_WEB_MODE: ${BPA_WEB_MODE}
BPA_LEDGER_BROWSER: ${BPA_LEDGER_BROWSER}
BPA_BOOTSTRAP_UN: ${BPA_BOOTSTRAP_UN}
BPA_BOOTSTRAP_PW: ${BPA_BOOTSTRAP_PW}
ACAPY_ENDPOINT: ${ACAPY2_ENDPOINT}
AGENT_NAME: ${AGENT2_NAME}
BPA_IMPRINT_URL: ${BPA_IMPRINT_URL}
BPA_PRIVACY_POLICY_URL: ${BPA_PRIVACY_POLICY_URL}
BPA_CREDDEF_REVOCATION_REGISTRY_SIZE: ${BPA_CREDDEF_REVOCATION_REGISTRY_SIZE}
ports:
- "${BPA2_PORT}:${BPA2_PORT}"
restart: always
bpa-agent2:
profiles:
- second_bpa
image: bcgovimages/aries-cloudagent:py36-1.16-0_0.7-pre.3
ports:
- ${ACAPY2_ADMIN_PORT}:${ACAPY2_ADMIN_PORT}
- ${ACAPY2_HTTP_PORT}:${ACAPY2_HTTP_PORT}
depends_on:
- bpa-wallet-db2
entrypoint: /bin/bash
command: [
"-c",
"sleep 15;
aca-py start \
--auto-provision
--arg-file acapy-static-args.yml \
--inbound-transport http '0.0.0.0' ${ACAPY2_HTTP_PORT} \
--webhook-url '${BPA2_WEBHOOK_URL}' \
--genesis-url '${ACAPY_GENESIS_URL}' \
--endpoint ${ACAPY2_ENDPOINT} \
--wallet-name '${ACAPY_WALLET_DATABASE}' \
--wallet-key '${ACAPY_WALLET_ENCRYPTION_KEY}' \
--wallet-storage-type '${ACAPY_WALLET_TYPE}' \
--wallet-storage-config '{\"url\":\"${POSTGRESQL2_HOST}:5432\",\"max_connections\":5}' \
--wallet-storage-creds '{\"account\":\"${POSTGRESQL_USER}\",\"password\":\"${POSTGRESQL_PASSWORD}\",\"admin_account\":\"${POSTGRESQL_USER}\",\"admin_password\":\"${POSTGRESQL_PASSWORD}\"}' \
--seed '${ACAPY_SEED2}' \
--admin '0.0.0.0' ${ACAPY2_ADMIN_PORT} \
--label '${AGENT2_NAME}' \
${ACAPY_ADMIN_CONFIG} \
${ACAPY_READ_ONLY_MODE} \
"
]
volumes:
- "./acapy-static-args.yml:/home/indy/acapy-static-args.yml"
bpa-wallet-db2:
profiles:
- second_bpa
image: "postgres:12-alpine"
environment:
- POSTGRES_USER=${POSTGRESQL_USER}
- POSTGRES_PASSWORD=${POSTGRESQL_PASSWORD}
ports:
- ${POSTGRESQL2_PORT}:5432
volumes:
- bpa-wallet-db2:/var/lib/postgresql/data
#######
# Volumes for the databases
#######
volumes:
bpa-wallet-db1:
bpa-wallet-db2: