graphprotocol / graphprotocol/graph-node
[Feature] Get network name and node from env vars
Open
Nobody has claimed this yet.
enhancement
Stale
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 1.1k
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
Description
When running the node using docker-compose, it would be helpful to get the network name and RPC url from environment variables instead of having to modify docker/docker-compose.yml#L22.
This change would do the trick:
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index c78c2eb21..36e8beba7 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -19,7 +19,7 @@ services:
postgres_pass: let-me-in
postgres_db: graph-node
ipfs: 'ipfs:5001'
- ethereum: 'mainnet:http://host.docker.internal:8545'
+ ethereum: ${NETWORK_NAME:-mainnet}:${ETHEREUM_RPC_URL:-http://host.docker.internal:8545}
GRAPH_LOG: info
ipfs:
image: ipfs/kubo:v0.17.0
What do you think?
Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
No.
Some information to help us out
- Tick this box if you plan on implementing this feature yourself.
- I have searched the issue tracker to make sure this issue is not a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docker/docker-compose.yml at the ethereum configuration around line 22 and review the proposed environment-variable defaults for the network name and RPC URL. Validate the compose configuration and confirm that both variables override their defaults without requiring edits to the file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100