forked from node-real/bsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
54 lines (50 loc) · 1.03 KB
/
docker-compose.yaml
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
version: '3.6'
services:
init:
image: alpine
command:
- /bin/sh
- -c
- |
chown -R 1000:1000 /data
echo "done grany data directory permission"
volumes:
- data:/data
bsc:
build:
context: .
dockerfile: Dockerfile
environment:
- NETWORK=mainnet
restart: unless-stopped
ports:
- 30303:30303
- 30311:30311
- 8545:8545
- 8546:8546
- 8575:8575
- 8576:8576
healthcheck:
test: |
[[ "$NETWORK" == "testnet" ]] && PORT=8575 || PORT=8545;
netstat -tunlp | grep $PORT > /dev/null; if [ 0 != $$? ]; then exit 1; else exit 0; fi;
interval: 5s
retries: 5
start_period: 10s
timeout: 3s
volumes:
- data:/data
- config:/bsc/config
volumes:
config:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/tmp/bsc/config/mainnet'
data:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/tmp/bsc/data/mainnet'