From ce3e088a0fd5de6a8949711899308d9153d08713 Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Thu, 12 May 2022 10:03:24 +0200 Subject: [PATCH] Initial commit Signed-off-by: Balazs Toldi --- .gitignore | 3 +++ compose.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .gitignore create mode 100644 compose.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3dcf8f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +\#*\# +*~ +ganache_data/ diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..498b278 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,51 @@ +version: "3.9" +services: + ganache: + image: trufflesuite/ganache:latest + ports: + - 8545:8545 + volumes: + - ./ganache_data:/ganache_data + entrypoint: + - node + - /app/dist/node/cli.js + - --deterministic + - --db=/ganache_data + - --hostname + - '0.0.0.0' + db: + image: postgres:13.6 + restart: always + container_name: 'postgres' + environment: + POSTGRES_PASSWORD: '' + POSTGRES_USER: 'postgres' + POSTGRES_HOST_AUTH_METHOD: 'trust' + volumes: + - ./postgres-data:/var/lib/postgresql/data + ports: + - 5432:5432 + + blockscout: + depends_on: + - db + - ganache + image: blockscout/blockscout:${DOCKER_TAG:-latest} + restart: always + container_name: 'blockscout' + links: + - db:database + command: 'mix do ecto.create, ecto.migrate, phx.server' + extra_hosts: + - 'host.docker.internal:host-gateway' + environment: + SUBNETWORK: Toldi + ETHEREUM_JSONRPC_VARIANT: 'ganache' + ETHEREUM_JSONRPC_HTTP_URL: http://ganache:8545/ + DATABASE_URL: postgresql://postgres:@db:5432/blockscout?ssl=false + INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: true + CHAIN_ID: 1337 + ECTO_USE_SSL: false + ports: + - 4000:4000 +