Hello everyone, im new here and using docker. We are developing an app and we need to use a subgraph, so the community that mantain TheSubgraph shared us a repo to run local node and test our subgraph. This work locally as we want, but we need test this with GitHub actions. Im using WSL2 with Ubunto 20.04LTS and this work nicely, but when we execute the GitHub action seems like a node is not connecting correctly. I did a lot of research, and i really think that host.docker.internal
is not resolving the IP in the GH Action. My PC do that because im using WSL and Docker for Windows and automatically know how resolve it (not sure if this is the real issue but im just thinking about it).
I know is something about this connection because the error is "WARN Trying again after net_version RPC call failed (attempt #10) with result Err(Transport error: Error(Connect, Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }))"
, which appear when i change the host.docker.internal
or i added a extra_host inside the docker-compose. Im not really sure about why this not run inside GitHub action and tbh i read a lot this days trying but wihtout success. So i decide to ask in the forum. This is no my area, but i need to run the test with this node and the tool is perfect to test.
Iāll share the docker-compose.yml file and the repo that the community shared us and we are using:
This is the repo, and this is the docker folder
version: '3'
services:
graph-node:
image: graphprotocol/graph-node:v0.22.0
ports:
- '8000:8000'
- '8001:8001'
- '8020:8020'
- '8030:8030'
- '8040:8040'
depends_on:
- ipfs
- postgres
environment:
postgres_host: postgres
postgres_user: graph-node
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: 'ipfs:5001'
ethereum: 'localhost:http://host.docker.internal:8545'
GRAPH_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
I hope that im asking in the right place and get some help. I tried to run this with CI/CD in Github since like a week. Let me know if is necessary more info or something, i really thanks for any help