forked from MystenLabs/sui
/
docker-compose.yml
163 lines (162 loc) · 5.2 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
version: "3.9"
services:
# Setup for Validator 0. A primary node and a worker
primary_0:
build:
context: ../
dockerfile: ./Docker/Dockerfile
image: narwhal-node:latest
environment:
- NODE_TYPE=primary
- VALIDATOR_ID=0
- LOG_LEVEL=-vvv
expose:
- "3000" # Port to listen on messages from other primary nodes
- "3001" # Port to listen on messages from our worker nodes
ports:
- "8000:8000" # expose the gRPC port to be publicly accessible
- "8100:8010" # expose the port listening to metrics endpoint for prometheus metrics
volumes:
- ./validators:/validators
- ./validators/validator-0/logs:/home/logs
worker_0:
build:
context: ../
dockerfile: ./Docker/Dockerfile
depends_on:
- primary_0
image: narwhal-node:latest
environment:
- NODE_TYPE=worker
- VALIDATOR_ID=0
- LOG_LEVEL=-vvv
- WORKER_ID=0
expose:
- "4000" # Port to listen on messages from our primary node
- "4001" # Port to listen for transactions from clients
- "4002" # Port to listen on messages from other worker nodes
ports:
- "7001:4001" # expose the port for the worker to accept transactions from clients
volumes:
- ./validators:/validators
- ./validators/validator-0/logs:/home/logs
# Setup for Validator 1. A primary node and a worker
primary_1:
build:
context: ../
dockerfile: ./Docker/Dockerfile
image: narwhal-node:latest
environment:
- NODE_TYPE=primary
- VALIDATOR_ID=1
- LOG_LEVEL=-vvv
expose:
- "3000" # Port to listen on messages from other primary nodes
- "3001" # Port to listen on messages from our worker nodes
ports:
- "8001:8000" # expose the gRPC port to be publicly accessible
- "8101:8010" # expose the port listening to metrics endpoint for prometheus metrics
volumes:
- ./validators:/validators
- ./validators/validator-1/logs:/home/logs
worker_1:
build:
context: ../
dockerfile: ./Docker/Dockerfile
depends_on:
- primary_1
image: narwhal-node:latest
environment:
- NODE_TYPE=worker
- VALIDATOR_ID=1
- LOG_LEVEL=-vvv
- WORKER_ID=0
expose:
- "4000" # Port to listen on messages from our primary node
- "4001" # Port to listen for transactions from clients
- "4002" # Port to listen on messages from other worker nodes
ports:
- "7002:4001" # expose the port for the worker to accept transactions from clients
volumes:
- ./validators:/validators
- ./validators/validator-1/logs:/home/logs
# Setup for Validator 2. A primary node and a worker
primary_2:
build:
context: ../
dockerfile: ./Docker/Dockerfile
image: narwhal-node:latest
environment:
- NODE_TYPE=primary
- VALIDATOR_ID=2
- LOG_LEVEL=-vvv
expose:
- "3000" # Port to listen on messages from other primary nodes
- "3001" # Port to listen on messages from our worker nodes
ports:
- "8002:8000" # expose the gRPC port to be publicly accessible
- "8102:8010" # expose the port listening to metrics endpoint for prometheus metrics
volumes:
- ./validators:/validators
- ./validators/validator-2/logs:/home/logs
worker_2:
build:
context: ../
dockerfile: ./Docker/Dockerfile
depends_on:
- primary_2
image: narwhal-node:latest
environment:
- NODE_TYPE=worker
- VALIDATOR_ID=2
- LOG_LEVEL=-vvv
- WORKER_ID=0
expose:
- "4000" # Port to listen on messages from our primary node
- "4001" # Port to listen for transactions from clients
- "4002" # Port to listen on messages from other worker nodes
ports:
- "7003:4001" # expose the port for the worker to accept transactions from clients
volumes:
- ./validators:/validators
- ./validators/validator-2/logs:/home/logs
# Setup for Validator 3. A primary node and a worker
primary_3:
build:
context: ../
dockerfile: ./Docker/Dockerfile
image: narwhal-node:latest
environment:
- NODE_TYPE=primary
- VALIDATOR_ID=3
- LOG_LEVEL=-vvv
expose:
- "3000" # Port to listen on messages from other primary nodes
- "3001" # Port to listen on messages from worker nodes
ports:
- "8003:8000" # expose the gRPC port to be publicly accessible
- "8103:8010" # expose the port listening to metrics endpoint for prometheus metrics
volumes:
- ./validators:/validators
- ./validators/validator-3/logs:/home/logs
worker_3:
build:
context: ../
dockerfile: ./Docker/Dockerfile
depends_on:
- primary_3
image: narwhal-node:latest
environment:
- NODE_TYPE=worker
- VALIDATOR_ID=3
- LOG_LEVEL=-vvv
- WORKER_ID=0
expose:
- "4000" # Port to listen on messages from our primary node
- "4001" # Port to listen for transactions from clients
- "4002" # Port to listen on messages from other worker nodes
ports:
- "7004:4001" # expose the port for the worker to accept transactions from clients
volumes:
- ./validators:/validators
- ./validators/validator-3/logs:/home/logs