-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (56 loc) · 1.74 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
version: '3.1'
services:
erigon:
image: thorax/erigon:v2022.08.01
user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000}
environment:
- DATA_DIR=${DATA_DIR:-~/.local/share/erigon/}
- MINER_ADDRESS=${MINER_ADDRESS}
command: |
/bin/sh -c "
[ -d $$DATA_DIR/chaindata ] || (
cp /tmp/genesis.json ~/genesis.json
sed -i s/_MINER_ADDRESS_/$$MINER_ADDRESS/g ~/genesis.json
cat ~/genesis.json
erigon init ~/genesis.json --networkid 69420 --http=false
)
echo $MINER_KEY > ~/.sigfile
erigon --private.api.addr=0.0.0.0:9090 --networkid 69420 --http=false --mine --miner.sigfile ~/.sigfile
"
volumes:
- ./data:/home/erigon/.local/share/erigon/
- ./genesis.json:/tmp/genesis.json
restart: unless-stopped
mem_swappiness: 0
rpcdaemon:
image: otterscan/erigon:v2022.08.01-otterscan
user: ${DOCKER_UID:-1000}:${DOCKER_GID:-1000}
volumes_from: [ erigon ]
command: |
rpcdaemon
${RPCDAEMON_FLAGS-}
--http.api web3,eth,net,erigon,ots
--http.addr=0.0.0.0
--http.vhosts=*
--http.corsdomain=*
--ws
--datadir /home/erigon/.local/share/erigon
--private.api.addr=erigon:9090
ports: [ "8545:8545" ]
restart: unless-stopped
mem_swappiness: 0
otterscan:
image: otterscan/otterscan:${OTTERSCAN_TAG:-latest}
environment:
- ERIGON_URL=${ERIGON_URL}
- CHAINS_DIR=/usr/share/nginx/html/chains
ports: [ "8080:80" ]
restart: unless-stopped
mem_swappiness: 0
command: |
/bin/sh -c "
[ -d $$CHAINS_DIR/eip155-69420.json ] || cp $$CHAINS_DIR/eip155-1.json $$CHAINS_DIR/eip155-69420.json
/run-nginx.sh
"
volumes:
datadir: