forked from masa-finance/masa-node-v1.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (76 loc) · 2.28 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
# Masa Testnet Node v1.0
version: "3.6"
x-masa-testnet-node-v10-def:
&masa-testnet-node-v10-def
restart: "on-failure"
image: "${MASA_DOCKER_IMAGE:-quorumengineering/quorum:22.1}"
expose:
- "21000"
- "50400"
healthcheck:
test: ["CMD", "wget", "--spider", "--proxy", "off", "http://localhost:8545"]
interval: 3s
timeout: 3s
retries: 10
start_period: 5s
labels:
com.masa.consensus: ${MASA_CONSENSUS:-istanbul}
entrypoint:
- /bin/sh
- -c
- |
DDIR=/qdata/dd
GENESIS_FILE="/network/genesis.json"
CONSENSUS_RPC_API="istanbul"
NETWORK_ID=$$(cat $${GENESIS_FILE} | grep chainId | awk -F " " '{print $$2}' | awk -F "," '{print $$1}')
GETH_ARGS_istanbul="--emitcheckpoints --istanbul.blockperiod 10 --mine --miner.threads 1 --syncmode full"
if [ ! -f $${DDIR}/control_file ]; then
mkdir -p $${DDIR}/keystore
mkdir -p $${DDIR}/geth
geth --datadir $${DDIR} init $${GENESIS_FILE}
echo "Created $$(date)" > $${DDIR}/control_file
fi
geth \
--identity node$${NODE_ID}-${MASA_CONSENSUS:-istanbul} \
--datadir $${DDIR} \
--bootnodes enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@54.146.254.245:21000 \
--verbosity 5 \
--networkid $${NETWORK_ID} \
--http \
--http.corsdomain "*" \
--http.vhosts "*" \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.api admin,eth,debug,miner,net,shh,txpool,personal,web3,quorum,$${CONSENSUS_RPC_API} \
--port 21000 \
--nousb \
${MASA_GETH_ARGS:-} $${GETH_ARGS_${MASA_CONSENSUS:-istanbul}}
services:
ui:
extends:
file: ./ui/docker-compose.yml
service: ui
masa-node:
<< : *masa-testnet-node-v10-def
hostname: masa-node
ports:
- "22001:8545"
volumes:
- vol1:/qdata
- ./network/testnet:/network:ro
environment:
- PRIVATE_CONFIG=${PRIVATE_CONFIG:-/qdata/tm/tm.ipc}
- NODE_ID=1
networks:
masa-testnet:
ipv4_address: 172.16.240.20
networks:
masa-testnet:
name: masa-testnet
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.240.0/24
volumes:
"vol1":