-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
82 lines (77 loc) · 2.09 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
version: "3.6"
services:
blockscout:
image: ghcr.io/demoslabs/blockscout:latest
build:
context: blockscout/
dockerfile: ./docker/Dockerfile
args:
COIN: ETH
restart: "no"
environment:
- PORT=4000
- DATABASE_URL=ecto://postgres:postgres@postgres/postgres?ssl=false
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- SUBNETWORK=Local
- NETWORK=Icing
- CHAIN_ID=1337
- COIN=ETH
- BLOCKSCOUT_VERSION=IcingOnTheCake
- ETHEREUM_JSONRPC_VARIANT=ganache
- ETHEREUM_JSONRPC_TRANSPORT=http
- ETHEREUM_JSONRPC_HTTP_URL=http://ganache-cli:8545
- ETHEREUM_JSONRPC_WS_URL=ws://ganache-cli:8545
entrypoint:
- /bin/sh
- -c
- |
cd /opt/app/;
echo $$MIX_ENV && mix do ecto.create, ecto.migrate; mix phx.server;
links:
- postgres
- ganache-cli
ports:
- 26000:4000
postgres:
image: postgres:12.5
restart: "on-failure"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- blockscoutpostgres:/var/lib/postgresql/data
command: postgres -c 'max_connections=2000'
ports:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 5
ganache-cli:
image: trufflesuite/ganache-cli:latest
restart: "on-failure"
ports:
- 8545:8545
volumes:
- ganache_data:/ganache_data
entrypoint:
- /bin/sh
- -c
- |
apk add curl;
node /app/ganache-core.docker.cli.js \
--deterministic \
--db=/ganache_data \
--mnemonic "test test test test test test test test test test test junk" \
--chainId "1337" \
--hostname "0.0.0.0"
healthcheck:
test: ["CMD", "curl", "--request", "POST", "localhost:8545","--header","Content-Type: application/json","--data-raw", '{"jsonrpc":"2.0","method":"net_listening","params":[], "id":67}']
interval: 5s
timeout: 10s
retries: 5
volumes:
blockscoutpostgres: null
ganache_data: null