forked from wl-buildingtools/nightfall
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
171 lines (160 loc) · 4.29 KB
/
docker-compose.yml
File metadata and controls
171 lines (160 loc) · 4.29 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
version: '3'
services:
accounts:
build:
context: ./accounts
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache
volumes:
- ./accounts/src:/app/src
- ./accounts/config:/app/config
- ./accounts/.babelrc:/app/.babelrc
environment:
BLOCKCHAIN_HOST: http://ganache
BLOCKCHAIN_PORT: 8545
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
restart: on-failure
volumes:
- ./api-gateway/src:/app/src
- ./api-gateway/config:/app/config
- ./api-gateway/.babelrc:/app/.babelrc
ports:
- "8001:80"
environment:
ACCOUNTS_HOST: http://accounts
ACCOUNTS_PORT: 80
ZKP_HOST: http://zkp
ZKP_PORT: 80
DATABASE_HOST: http://database
DATABASE_PORT: 80
OFFCHAIN_HOST: http://offchain
OFFCHAIN_PORT: 80
offchain:
build:
context: ./offchain
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache
volumes:
- ./offchain/src:/app/src
- ./offchain/build:/app/build
- ./offchain/.babelrc:/app/.babelrc
- ./offchain/__tests__:/app/__tests__
- ./zkp-utils:/app/node_modules/zkp-utils
- ./account-utils:/app/src/account-utils
- ./config:/app/stats-config
- ./offchain/config:/app/config
environment:
AUTHENTICATION_API_HOST: http://api-gateway
AUTHENTICATION_API_PORT: 80
BLOCKCHAIN_HOST: http://ganache
BLOCKCHAIN_PORT: 8545
zkp:
build:
context: ./zkp
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache
volumes:
- ./zkp/src:/app/src
- ./zkp/build:/app/build
- ./zkp/code:/app/code
- ./zkp/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./account-utils:/app/src/account-utils
- ./zkp/__tests__:/app/__tests__
- ./config:/app/stats-config
- ./zkp/config:/app/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
BLOCKCHAIN_HOST: http://ganache
BLOCKCHAIN_PORT: 8545
ZKP_CODE_VOLUME: nightfall_zkp-code
ui:
build:
context: ./ui
dockerfile: Dockerfile
restart: on-failure
volumes:
- ./ui/src:/app/src
- ./ui/angular.json:/app/angular.json
- ./ui/tsconfig.json:/app/tsconfig.json
ports:
- "8000:80"
ganache:
image: trufflesuite/ganache-cli:latest
command: ganache-cli --accounts=10 --defaultBalanceEther=1000
ports:
- "8545:8545"
database:
build:
context: ./database
dockerfile: Dockerfile
restart: on-failure
depends_on:
- mongo
volumes:
- ./database/src:/app/src
- ./database/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./database/config:/app/config
- ./database/setup-mongo-acl-for-new-users.js:/app/setup-mongo-acl-for-new-users.js
mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
- MONGO_INITDB_DATABASE=nightfall
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- mongo-volume:/data/db
truffle-offchain:
image: ajmay/truffle:5.0.9
environment:
SOLC_VERSION: 0.5.8
ETH_HOST: ganache
ETH_GAS: 6000000
ETH_GAS_PRICE: 20000000000
volumes:
- ./offchain/contracts:/truffle/contracts:delegated
- ./offchain/migrations/:/truffle/migrations:delegated
- ./offchain/build/contracts/:/truffle/build/contracts:cached
- ./offchain/test/:/truffle/test:delegated
depends_on:
- ganache
logging:
options:
max-size: 10m
truffle-zkp:
image: ajmay/truffle:5.0.9
environment:
SOLC_VERSION: 0.5.8
ETH_HOST: ganache
ETH_GAS: 6000000
ETH_GAS_PRICE: 20000000000
volumes:
- ./zkp/contracts/:/truffle/contracts:delegated
- ./zkp/migrations/:/truffle/migrations:delegated
- ./zkp/build/contracts/:/truffle/build/contracts:cached
- ./zkp/test/:/truffle/test:delegated
- ./zkp/src/:/truffle/src:delegated
depends_on:
- ganache
logging:
options:
max-size: 10m
volumes:
mongo-volume: {}
zkp-code:
driver: local
driver_opts:
type: none
device: $PWD/zkp/code/
o: bind