-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-validator2.yml
126 lines (119 loc) · 3.85 KB
/
docker-compose-validator2.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
x-logging: &logging
logging:
driver: json-file
options:
max-size: 10m
max-file: '3'
services:
validator2-common-init:
container_name: validator2-common-init
image: alpine
command: >
sh -c "apk add --no-cache openssl && openssl rand -hex 32 >
/root/.story/geth/data/jwtsecret"
volumes:
- db-validator2-geth-data:/root/.story/geth/data
validator2-geth-init:
container_name: validator2-geth-init
image: story-geth:localnet
build:
context: ../story-geth
dockerfile: ../story-localnet/Dockerfile.story-geth
entrypoint: ''
command: >
/bin/sh -c "/usr/local/bin/geth --state.scheme=hash init
--datadir=/root/.story/geth/data /root/.story/geth/config/genesis.json"
volumes:
- ./config/story/genesis-geth.json:/root/.story/geth/config/genesis.json:ro
- db-validator2-geth-data:/root/.story/geth/data
depends_on:
- validator2-common-init
validator2-geth:
container_name: validator2-geth
restart: unless-stopped
stop_grace_period: 50s
image: story-geth:localnet
build:
context: ../story-geth
dockerfile: ../story-localnet/Dockerfile.story-geth
entrypoint: >
sh -c 'sleep 10 && geth "$$@"'
command:
- --datadir=/root/.story/geth/data
- --config=/root/.story/geth/config/geth.toml
- --nodekey=/root/.story/geth/config/nodekey
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.vhosts=*
- --authrpc.jwtsecret=/root/.story/geth/data/jwtsecret
- --http
- --http.vhosts=*
- --http.addr=0.0.0.0
- --http.port=8545
- --http.api=web3,eth,txpool,net,engine,debug,admin
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --port=30303
- --discovery.port=30303
- --nat=extip:10.0.0.22
volumes:
- ./config/story/validator2/geth:/root/.story/geth/config
- db-validator2-geth-data:/root/.story/geth/data
- db-validator2-node-data:/root/.story/story/data
networks:
story-localnet:
ipv4_address: 10.0.0.22
depends_on:
- validator2-geth-init
<<: *logging
validator2-node-init:
container_name: validator2-node-init
image: alpine
command: >
sh -c "echo '{\"height\": \"0\", \"round\": 0, \"step\": 0}' >
/root/.story/story/data/priv_validator_state.json"
volumes:
- db-validator2-node-data:/root/.story/story/data
depends_on:
- validator2-common-init
validator2-node:
container_name: validator2-node
restart: unless-stopped
stop_grace_period: 50s
image: story-node:localnet
build:
context: ../story
dockerfile: ../story-localnet/Dockerfile.story-node
entrypoint: >
sh -c 'sleep 10 && story run "$$@"'
command:
- --api-enable
- --api-address=0.0.0.0:1317
- --engine-jwt-file=/root/.story/geth/data/jwtsecret
- --engine-endpoint=http://validator2-geth:8551
- --log-level=debug
volumes:
- ./config/story/genesis-node.json:/root/.story/story/config/genesis.json
- ./config/story/validator2/story/config.toml:/root/.story/story/config/config.toml
- ./config/story/validator2/story/node_key.json:/root/.story/story/config/node_key.json
- ./config/story/validator2/story/priv_validator_key.json:/root/.story/story/config/priv_validator_key.json
- ./config/story/validator2/story/story.toml:/root/.story/story/config/story.toml
- db-validator2-geth-data:/root/.story/geth/data
- db-validator2-node-data:/root/.story/story/data
networks:
story-localnet:
ipv4_address: 10.0.0.23
depends_on:
- validator2-geth
- validator2-node-init
<<: *logging
volumes:
db-validator2-geth-data:
db-validator2-node-data:
networks:
story-localnet:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/16