forked from wl-buildingtools/nightfall
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
185 lines (174 loc) · 4.51 KB
/
docker-compose.test.yml
File metadata and controls
185 lines (174 loc) · 4.51 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
version: '3'
services:
accounts_test:
build:
context: ./accounts
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache_test
volumes:
- ./accounts/src:/app/src
- ./accounts/config:/app/config
- ./accounts/.babelrc:/app/.babelrc
environment:
NODE_ENV: test
BLOCKCHAIN_HOST: http://ganache_test
BLOCKCHAIN_PORT: 8545
networks:
- test_net
api-gateway_test:
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
environment:
NODE_ENV: test
ACCOUNTS_HOST: http://accounts_test
ACCOUNTS_PORT: 80
ZKP_HOST: http://zkp_test
ZKP_PORT: 80
DATABASE_HOST: http://database_test
DATABASE_PORT: 80
OFFCHAIN_HOST: http://offchain_test
OFFCHAIN_PORT: 80
ports:
- "8001:80"
networks:
- test_net
offchain_test:
build:
context: ./offchain
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache_test
volumes:
- ./offchain/src:/app/src
- ./offchain/build-test:/app/build
- ./offchain/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./config:/app/stats-config
- ./offchain/config:/app/config
environment:
NODE_ENV: test
AUTHENTICATION_API_HOST: http://api-gateway_test
AUTHENTICATION_API_PORT: 80
BLOCKCHAIN_HOST: http://ganache_test
BLOCKCHAIN_PORT: 8545
networks:
- test_net
zkp_test:
build:
context: ./zkp
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache_test
volumes:
- ./zkp/src:/app/src
- ./zkp/build-test:/app/build
- ./zkp/code:/app/code
- ./zkp/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./config:/app/stats-config
- ./zkp/config:/app/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
NODE_ENV: test
BLOCKCHAIN_HOST: http://ganache_test
BLOCKCHAIN_PORT: 8545
ZKP_CODE_VOLUME: nightfall_zkp_code_test
networks:
- test_net
ganache_test:
image: trufflesuite/ganache-cli:latest
command: ganache-cli --accounts=10 --defaultBalanceEther=1000
ports:
- "8546:8545"
networks:
- test_net
database_test:
build:
context: ./database
dockerfile: Dockerfile
restart: on-failure
depends_on:
- mongo_test
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
environment:
- NODE_ENV=test
networks:
- test_net
mongo_test:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
- MONGO_INITDB_DATABASE=nightfall_test
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- mongo_volume_test:/data/db
networks:
- test_net
truffle-offchain_test:
image: ajmay/truffle:5.0.9
environment:
SOLC_VERSION: 0.5.8
ETH_HOST: ganache_test
ETH_GAS: 6000000
ETH_GAS_PRICE: 20000000000
volumes:
- ./offchain/contracts:/truffle/contracts:delegated
- ./offchain/migrations/:/truffle/migrations:delegated
- ./offchain/build-test/contracts/:/truffle/build/contracts:cached
- ./offchain/test/:/truffle/test:delegated
depends_on:
- ganache_test
logging:
options:
max-size: 10m
networks:
- test_net
truffle-zkp_test:
image: ajmay/truffle:5.0.9
environment:
SOLC_VERSION: 0.5.8
ETH_HOST: ganache_test
ETH_GAS: 6000000
ETH_GAS_PRICE: 20000000000
volumes:
- ./zkp/contracts/:/truffle/contracts:delegated
- ./zkp/migrations/:/truffle/migrations:delegated
- ./zkp/build-test/contracts/:/truffle/build/contracts:cached
- ./zkp/test/:/truffle/test:delegated
- ./zkp/src/:/truffle/src:delegated
depends_on:
- ganache_test
logging:
options:
max-size: 10m
networks:
- test_net
volumes:
mongo_volume_test: {}
zkp_code_test:
driver: local
driver_opts:
type: none
device: $PWD/zkp/code/
o: bind
networks:
test_net:
driver: bridge
ipam:
driver: default