This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
77 lines (73 loc) · 1.71 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
version: '3.7'
services:
bootnode:
hostname: bootnode
container_name: bootnode
env_file:
- .env
image: ${IMAGE_NAME}
volumes:
- bootnode-vol:/root
build:
context: ${IMAGE_NAME}
args:
- ACCOUNT_PASSWORD=${ACCOUNT_PASSWORD}
command:
--nodekeyhex=${NODEKEY}
--ipcdisable
--networkid=${NETWORK_ID}
--port=${NETWORK_PORT}
json-rpc:
hostname: json-rpc
container_name: json-rpc
env_file:
- .env
image: ${IMAGE_NAME}
volumes:
- json-rpc-vol:/root
build:
context: ${IMAGE_NAME}
args:
- ACCOUNT_PASSWORD=${ACCOUNT_PASSWORD}
command:
--bootnodes="enode://${ENODE}@${BOOTNODE_IP}:${NETWORK_PORT}"
--allow-insecure-unlock
--http
--http.addr="0.0.0.0"
--http.api="eth,web3,net,admin,personal"
--http.corsdomain="*"
--http.port=${RPC_PORT}
--graphql
--graphql.corsdomain="*"
--ws
--ws.api=eth,net,web3
--ws.port=${WS_PORT}
--networkid=${NETWORK_ID}
ports:
- "${RPC_PORT}:${RPC_PORT}"
- "${WS_PORT}:${WS_PORT}"
miner:
container_name: miner
hostname: miner
env_file:
- .env
image: ${IMAGE_NAME}
volumes:
- miner-vol:/root
build:
context: ${IMAGE_NAME}
args:
- ACCOUNT_PASSWORD=${ACCOUNT_PASSWORD}
depends_on:
- bootnode
command:
--bootnodes="enode://${ENODE}@${BOOTNODE_IP}:${NETWORK_PORT}"
--networkid=${NETWORK_ID}
--preload="/root/scripts/mine-when-need.js"
--mine
--miner.etherbase ${SINGER_ADDRESS}
--unlock ${SINGER_ADDRESS} --password password.txt
volumes:
bootnode-vol:
json-rpc-vol:
miner-vol: