forked from EYBlockchain/nightfall_3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
183 lines (174 loc) · 4.52 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
version: '3.5'
# Use this script for running up nightfall_3 in 'developer' mode with local
# bindings. See the readme for more information.
services:
client1:
image: ghcr.io/eyblockchain/nightfall3-client:latest
volumes:
- type: volume
source: build
target: /app/build
- type: volume
source: mongodb1
target: /app/mongodb
networks:
- nightfall_network
ports:
- 27017:27017
- 8080:80
depends_on:
- deployer
- worker
- rabbitmq1
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
LOG_LEVEL: debug
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
ZOKRATES_WORKER_HOST: worker
RABBITMQ_HOST: amqp://rabbitmq1
RABBITMQ_PORT: 5672
ENABLE_QUEUE: 1
OPTIMIST_HOST: optimist1
OPTIMIST_PORT: 80
USE_STUBS: 'false' # make sure this flag is the same as in deployer service
command: [ 'npm', 'run', 'dev' ]
client2:
image: ghcr.io/eyblockchain/nightfall3-client:latest
volumes:
- type: volume
source: build
target: /app/build
- type: volume
source: mongodb2
target: /app/mongodb
networks:
- nightfall_network
ports:
- 27018:27017
- 8084:80
depends_on:
- deployer
- worker
- rabbitmq2
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
LOG_LEVEL: error
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
ZOKRATES_WORKER_HOST: worker
RABBITMQ_HOST: amqp://rabbitmq2
RABBITMQ_PORT: 5672
ENABLE_QUEUE: 1
OPTIMIST_HOST: optimist2
OPTIMIST_PORT: 80
USE_STUBS: 'false' # make sure this flag is the same as in deployer service
command: [ 'npm', 'run', 'dev' ]
worker:
# image: 3800decac71d
image: ghcr.io/eyblockchain/nightfall3-worker:latest
volumes:
- type: volume
source: proving_files
target: /app/output/
depends_on:
- deployer
networks:
- nightfall_network
environment:
LOG_LEVEL: info
# Temporary container to deploy contracts and circuits and populate volumes
deployer:
#image: docker.pkg.github.com/eyblockchain/nightfall-deployer/nightfall_deployer:1.1.0
image: ghcr.io/eyblockchain/nightfall3-deployer:latest
volumes:
- type: volume
source: build
target: /app/build/
networks:
- nightfall_network
environment:
LOG_LEVEL: debug
# ETH_NETWORK sets the network selected by Truffle from truffle-config.js
# startup routines will wait for a blockchain client to be reachable on this network
ETH_NETWORK: blockchain1
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
ZOKRATES_WORKER_HOST: worker
USE_STUBS: 'false'
rabbitmq1:
image: rabbitmq
ports:
- '15674:15674'
- '5672:5672'
networks:
- nightfall_network
rabbitmq2:
image: rabbitmq
ports:
- '15675:15674'
- '5673:5672'
networks:
- nightfall_network
optimist1:
image: ghcr.io/eyblockchain/nightfall3-optimist:latest
depends_on:
- deployer
networks:
- nightfall_network
ports:
- 8081:80
# websocket port for Optimist is on localhost:8082
- 8082:8080
volumes:
- type: volume
source: build
target: /app/build/
environment:
WEBSOCKET_PORT: 8080
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
HASH_TYPE: mimc
LOG_LEVEL: debug
IS_CHALLENGER: 'true'
TRANSACTIONS_PER_BLOCK: ${TRANSACTIONS_PER_BLOCK:-2}
command: [ 'npm', 'run', 'dev' ]
optimist2:
image: ghcr.io/eyblockchain/nightfall3-optimist:latest
depends_on:
- deployer
networks:
- nightfall_network
ports:
- 8085:80
# websocket port for Optimist is on localhost:8086
- 8086:8080
volumes:
- type: volume
source: build
target: /app/build/
environment:
WEBSOCKET_PORT: 8080
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
HASH_TYPE: mimc
LOG_LEVEL: error
IS_CHALLENGER: 'true'
TRANSACTIONS_PER_BLOCK: ${TRANSACTIONS_PER_BLOCK:-2}
command: [ 'npm', 'run', 'dev' ]
volumes:
mongodb1: null
mongodb2: null
proving_files: null
build:
null
networks:
nightfall_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
gateway: 172.16.238.1