[Feature] Get network name and node from env vars

未关闭
#5,697 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
52/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞
技术栈
docker-compose
领域
devops

调研方向

从 docker/docker-compose.yml 中第 22 行附近的 ethereum 配置开始,检查为网络名称和 RPC URL 提议的环境变量默认值。验证 Compose 配置,并确认这两个变量都能覆盖其默认值,而无需编辑该文件。

由索引模型根据 Issue 内容生成。

描述

enhancement Stale
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.
主要语言
Rust
星标
3.2k
派生
1.1k
平均合并
4 天 1 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

graphprotocol/graph-node 的其他 Issue

查看 graphprotocol/graph-node 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。