-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (98 loc) · 3.24 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
version: "3.1"
services:
clock-fix:
image: alpine
command: hwclock -s
privileged: true
bootnode:
image: bootnode
build:
context: ./
dockerfile: Dockerfile.bootnode
command: -nodekey /conf/bootnode.key
links:
- clock-fix
volumes:
- ./config:/conf
networks:
ether:
ipv4_address: 10.5.0.4
ports:
- "30301:30301"
geth-node1-init:
image: geth
build:
context: ./
dockerfile: Dockerfile.geth
command: --datadir /data init /conf/genesis.json
links:
- clock-fix
volumes:
- ./config:/conf
- geth-node1-data:/data
geth-node1:
image: geth
build:
context: ./
dockerfile: Dockerfile.geth
links:
- geth-node1-init
- bootnode
command: --datadir /data --verbosity 2 --networkid 999 --identity "Node1" --rpc --rpcapi admin,db,debug,eth,miner,net,personal,shh,txpool,web3 --rpcaddr "0.0.0.0" --rpccorsdomain "*" --ws --wsaddr "0.0.0.0" --wsorigins "*" --bootnodes "enode://eb526482d9d2c27c103deca98587a229abec4bbc230e49c390428c468d4da14aaa1e40b23417f19fab3998137d75d8e18c46a66bf132eee5824f339552ca6f0d@10.5.0.4:30301" --minerthreads 1 --etherbase 0x5fe2ebc7cc54560d7d88681f8277c91b57c7362a
ports:
- "30303:30303"
- "8545:8545"
- "8546:8546"
volumes:
- geth-node1-data:/data
networks:
ether:
ipv4_address: 10.5.0.5
geth-node2-installKeys:
image: alpine
command: sh -c "mkdir -p /data/keystore && cp -f /conf/keys/* /data/keystore/"
links:
- clock-fix
volumes:
- ./config:/conf
- geth-node2-data:/data
geth-node2-init:
image: geth
build:
context: ./
dockerfile: Dockerfile.geth
command: --datadir /data init /conf/genesis.json
links:
- clock-fix
volumes:
- ./config:/conf
- geth-node2-data:/data
geth-node2:
image: geth
build:
context: ./
dockerfile: Dockerfile.geth
links:
- geth-node2-init
- geth-node2-installKeys
- bootnode
command: --datadir /data --verbosity 2 --networkid 999 --identity "Node2" --rpc --rpcapi admin,db,debug,eth,miner,net,personal,shh,txpool,web3 -rpcaddr "0.0.0.0" --rpccorsdomain "*" --ws --wsaddr "0.0.0.0" --wsorigins "*" --bootnodes "enode://eb526482d9d2c27c103deca98587a229abec4bbc230e49c390428c468d4da14aaa1e40b23417f19fab3998137d75d8e18c46a66bf132eee5824f339552ca6f0d@10.5.0.4:30301" --minerthreads 1 --etherbase 0x5fe2ebc7cc54560d7d88681f8277c91b57c7362a
ports:
- "30304:30303"
- "8547:8545"
- "8548:8546"
volumes:
- geth-node2-data:/data
networks:
ether:
ipv4_address: 10.5.0.6
volumes:
geth-node1-data:
geth-node2-data:
networks:
ether:
driver: bridge
ipam:
config:
-
subnet: 10.5.0.0/16