Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative fix for graph node setup issue #56

Open
dapplion opened this issue Apr 24, 2020 · 4 comments
Open

Alternative fix for graph node setup issue #56

dapplion opened this issue Apr 24, 2020 · 4 comments

Comments

@dapplion
Copy link

dapplion commented Apr 24, 2020

Trying to run this repo locally I got stuck on yarn create-local due to the node being unable to connect to a local node (issue graphprotocol/graph-node#1132). The proposed solution did not work for me and graph node was still unable to connect to the node despite using 0.0.0.0.

To fix it I included ganache as a service in the graph-node/docker/docker-compose.yml and reference it with the docker's internal DNS "mainnet:http://ganache:8545"

I've opened the issue in case this solution can be other users find this solution useful to setup.

# graph-node/docker/docker-compose.yml

version: "3"
services:
  graph-node:
    image: graphprotocol/graph-node
    ports:
      - "8000:8000"
      - "8001:8001"
      - "8020:8020"
      - "8030:8030"
      - "8040:8040"
    depends_on:
      - ipfs
      - postgres
    environment:
      postgres_host: postgres:5432
      postgres_user: graph-node
      postgres_pass: let-me-in
      postgres_db: graph-node
      ipfs: "ipfs:5001"
+      ethereum: "mainnet:http://ganache:8545"
      RUST_LOG: info
  ipfs:
    image: ipfs/go-ipfs:v0.4.23
    ports:
      - "5001:5001"
    volumes:
      - ./data/ipfs:/data/ipfs
  postgres:
    image: postgres
    ports:
      - "5432:5432"
    command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
    environment:
      POSTGRES_USER: graph-node
      POSTGRES_PASSWORD: let-me-in
      POSTGRES_DB: graph-node
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
+  ganache:
+    image: trufflesuite/ganache-cli
+    ports:
+      - "8545:8545"
+    command: -i 15 --gasLimit 8000000 --deterministic

PD: Thanks @facuspagnuolo for the workshop, it motivated me to look deeper into graphprotocol ❤️

@facuspagnuolo
Copy link
Contributor

Thx for sharing @dapplion ! Glad you enjoyed the workshop 😄

@0xclem
Copy link

0xclem commented May 28, 2020

@dapplion thanks for the fix!

@haustasis
Copy link

@dapplion Nice!

@samuel-casey
Copy link

@dapplion worked for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants