forked from wl-buildingtools/nightfall
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
156 lines (145 loc) · 3.87 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
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:
VIRTUAL_HOST: accounts.nightfall.docker
api-gateway:
build:
context: ./API-Gateway
dockerfile: Dockerfile
restart: on-failure
volumes:
- ./api-gateway/src:/app/src
- ./api-gateway/.babelrc:/app/.babelrc
environment:
VIRTUAL_HOST: api.nightfall.docker
offchain:
build:
context: ./offchain
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache
volumes:
- ./offchain/src:/app/src
- ./offchain/response:/app/response
- ./offchain/build:/app/build
- ./offchain/.babelrc:/app/.babelrc
- ./offchain/__tests__:/app/__tests__
- ./zkp-utils:/app/node_modules/zkp-utils
- ./config:/app/config
environment:
VIRTUAL_HOST: offchain.nightfall.docker
zkp:
build:
context: ./zkp
dockerfile: Dockerfile
restart: on-failure
depends_on:
- ganache
volumes:
- ./zkp/src:/app/src
- ./zkp/response:/app/response
- ./zkp/build:/app/build
- ./zkp/code:/app/code
- ./zkp/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./zkp/__tests__:/app/__tests__
- ./config:/app/config
- /var/run/docker.sock:/var/run/docker.sock
environment:
VIRTUAL_HOST: zkp.nightfall.docker
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
environment:
VIRTUAL_HOST: nightfall.docker
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/response:/app/response
- ./database/.babelrc:/app/.babelrc
- ./zkp-utils:/app/node_modules/zkp-utils
- ./config:/app/config
- ./database/script_to_configure_roles.js:/app/script_to_configure_roles.js
environment:
VIRTUAL_HOST: database.nightfall.docker
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