forked from wip-abramson/aries-jupyter-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
343 lines (339 loc) · 10.5 KB
/
docker-compose.prod.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
######################################################################################
############# Aries ACA-Py ACC-Py Jupyter Playground Configuration ###############
######################################################################################
##### The example configuration defines services for two actors: Alice and Bob #####
##### A template for the set of actor actor is provided below these #####
##### Uncomment and customise as you like #####
##### You will need to create a folder under playground for this actor #####
##### Copy the template playground/actor folder to get started #####
##### This contains an empty notebooks folder and a template dummy.env file #####
##### The notebooks folder will be mounted in the jupyter workspace #####
##### You need to customise the dummy.env file and rename it to .env #####
##### Change any variables enclosed with < > e.g. ENV=<actor> #####
##### You do not need to change the ports - each agent runs on it's own container ####
##### Make sure you map the ports in the env file to unique ports on your machine ####
##### All the docker services use this file #####
##### Add any defined services to the DEFAULT_CONTAINERS arg in the manage file #####
######################################################################################
version: "3"
services:
##### GMC Services #####
# wallet-db
# a postgres database where agent data will be persisted unless you run ./manage down
# ./manage stop with stop the containers but persist the database volumes
general-medical-council-wallet-db:
image: postgres:11
container_name: general-medical-council-wallet-db
command: postgres -c listen_addresses='*'
# env file defines
env_file:
- playground/general-medical-council/.env
# This creates the data base tables if not present. See resources/init.sql #
volumes:
- ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- global-prod
tty: true
### agent
# This is general-medical-council's ACA-Py instance
# See dockerfiles/Dockerfile.agent.prod
general-medical-council-agent:
build:
context: .
dockerfile: dockerfiles/Dockerfile.agent.prod
env_file:
- playground/general-medical-council/.env
## These map from ports defined in the .env file to unique ports on your machine
## YOUR_MACHINE:DOCKER_SERVICE
ports:
# HTTP_PORT
- 4020:3020
# ADMIN_PORT
- 4021:3021
depends_on:
- general-medical-council-wallet-db
networks:
- global-prod
volumes:
- ./playground/general-medical-council/logs:/home/indy/logs
### business-logic
# This is where you will create notebooks to interact with your agent
# This uses the aries-cloudcontroller pip package.
# See dockerfiles/Dockerfile.controller
# All business logic share a common set of code recipes to get you started
general-medical-council-business-logic:
build:
context: .
dockerfile: dockerfiles/Dockerfile.controller
env_file:
- playground/general-medical-council/.env
depends_on:
- general-medical-council-agent
networks:
- global-prod
volumes:
- ./playground/general-medical-council/notebooks:/workspace
- ./recipes:/workspace/recipes
ports:
# Jupyter Notebook port - always map from 8888 to any available port
- 8889:8888
# WEBHOOK_PORT
- 4010:3010
#########################################################################
edinburgh-medical-school-wallet-db:
image: postgres:11
container_name: edinburgh-medical-school-wallet-db
command: postgres -c listen_addresses='*'
env_file:
- playground/edinburgh-medical-school/.env
volumes:
- ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- global-prod
tty: true
# ngrok-edinburgh-medical-school:
# image: wernight/ngrok
# env_file:
# - playground/edinburgh-medical-school/.env
# command: ngrok http edinburgh-medical-school-agent:3020 --log stdout
# networks:
# - edinburgh-medical-school-domain
edinburgh-medical-school-agent:
build:
context: .
dockerfile: dockerfiles/Dockerfile.agent.prod
env_file:
- playground/edinburgh-medical-school/.env
ports:
- 3020:3020
- 3021:3021
depends_on:
- edinburgh-medical-school-wallet-db
networks:
- global-prod
volumes:
- ./playground/edinburgh-medical-school/logs:/home/indy/logs
edinburgh-medical-school-business-logic:
build:
context: .
dockerfile: dockerfiles/Dockerfile.controller
env_file:
- playground/edinburgh-medical-school/.env
depends_on:
- edinburgh-medical-school-agent
networks:
- global-prod
volumes:
- ./playground/edinburgh-medical-school/notebooks:/workspace
- ./recipes:/workspace/recipes
ports:
- "8888:8888"
- 3010:3010
healthcare-professional-wallet-db:
image: postgres:11
container_name: healthcare-professional-wallet-db
command: postgres -c listen_addresses='*'
# env file defines
env_file:
- playground/healthcare-professional/.env
volumes:
- ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- global-prod
tty: true
healthcare-professional-agent:
build:
context: .
dockerfile: dockerfiles/Dockerfile.agent.prod
env_file:
- playground/healthcare-professional/.env
ports:
# HTTP_PORT
- 6020:3020
# ADMIN_PORT
- 6021:3021
depends_on:
- healthcare-professional-wallet-db
networks:
- global-prod
volumes:
- ./playground/healthcare-professional/logs:/home/indy/logs
healthcare-professional-business-logic:
build:
context: .
dockerfile: dockerfiles/Dockerfile.controller
env_file:
- playground/healthcare-professional/.env
depends_on:
- healthcare-professional-agent
networks:
- global-prod
volumes:
- ./playground/healthcare-professional/notebooks:/workspace
- ./recipes:/workspace/recipes
ports:
- 8890:8888
# WEBHOOK_PORT
- 6010:3010
rie-wallet-db:
image: postgres:11
container_name: rie-wallet-db
command: postgres -c listen_addresses='*'
# env file defines
env_file:
- playground/royal-infirmary-edinburgh/.env
volumes:
- ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- global-prod
tty: true
rie-agent:
build:
context: .
dockerfile: dockerfiles/Dockerfile.agent.prod
env_file:
- playground/royal-infirmary-edinburgh/.env
ports:
# HTTP_PORT
- 9020:3020
# ADMIN_PORT
- 9021:3021
depends_on:
- rie-wallet-db
networks:
- global-prod
volumes:
- ./playground/royal-infirmary-edinburgh/logs:/home/indy/logs
rie-business-logic:
build:
context: .
dockerfile: dockerfiles/Dockerfile.controller
env_file:
- playground/royal-infirmary-edinburgh/.env
depends_on:
- rie-agent
networks:
- global-prod
volumes:
- ./playground/royal-infirmary-edinburgh/notebooks:/workspace
- ./recipes:/workspace/recipes
ports:
- 8893:8888
# WEBHOOK_PORT
- 9010:3010
scottish-deanery-wallet-db:
image: postgres:11
container_name: scottish-deanery-wallet-db
command: postgres -c listen_addresses='*'
# env file defines
env_file:
- playground/scottish-deanery/.env
volumes:
- ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- global-prod
tty: true
scottish-deanery-agent:
build:
context: .
dockerfile: dockerfiles/Dockerfile.agent.prod
env_file:
- playground/scottish-deanery/.env
ports:
# HTTP_PORT
- 1020:3020
# ADMIN_PORT
- 1021:3021
depends_on:
- scottish-deanery-wallet-db
networks:
- global-prod
volumes:
- ./playground/scottish-deanery/logs:/home/indy/logs
scottish-deanery-business-logic:
build:
context: .
dockerfile: dockerfiles/Dockerfile.controller
env_file:
- playground/scottish-deanery/.env
depends_on:
- scottish-deanery-agent
networks:
- global-prod
volumes:
- ./playground/scottish-deanery/notebooks:/workspace
- ./recipes:/workspace/recipes
ports:
- 8895:8888
# WEBHOOK_PORT
- 1010:3010
# #### ACTOR TEMPLATE SERVICES - Uncomment and edit as appropriate ######
# actor-wallet-db:
# image: postgres:11
# container_name: actor-wallet-db
# command: postgres -c listen_addresses='*'
# # env file defines
# env_file:
# - playground/actor/.env
# volumes:
# - ./resources/init.sql:/docker-entrypoint-initdb.d/init.sql
# networks:
# - actor-domain
# tty: true
# ngrok-actor:
# image: wernight/ngrok
# command: ngrok http actor-agent:3020 --log stdout
# networks:
# - actor-domain
# actor-agent:
# build:
# context: .
# dockerfile: dockerfiles/Dockerfile.agent.prod
# env_file:
# - playground/actor/.env
# ports:
# # HTTP_PORT
# - <UNIQUE_PORT>:3020
# # ADMIN_PORT
# - <UNIQUE_PORT>:3021
# depends_on:
# - actor-wallet-db
# networks:
# - actor-domain
# actor-business-logic:
# build:
# context: .
# dockerfile: dockerfiles/Dockerfile.controller
# env_file:
# - playground/actor/.env
# depends_on:
# - actor-agent
# networks:
# - actor-domain
# volumes:
# - ./playground/actor/notebooks:/workspace
# - ./recipes:/workspace/recipes
# ports:
# - 8890:8888
# # WEBHOOK_PORT
# - <UNIQUE_PORT>:3010
##### UNCOMMENT FOR A TAILS SERVER ######
# Note - for revocation to work you will have to make additional changes to the env files
tails-server:
build:
context: https://github.com/bcgov/indy-tails-server.git
dockerfile: docker/Dockerfile.tails-server
ports:
- 6543:6543
networks:
- global-prod
volumes:
- ./tmp/tails-files:/tmp/tails-files:z
command: >
tails-server
--host 0.0.0.0
--port 6543
--storage-path /tmp/tails-files
--log-level INFO
networks:
global-prod: