Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85cd292

Browse files
committed
docker: Rename pod_name to node_id
1 parent bbfb9b1 commit 85cd292

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ ENV ethereum ""
5151
# The role the node should have, one of index-node, query-node, or
5252
# combined-node
5353
ENV node_role "combined-node"
54+
# The name of this node
55+
ENV node_id "default"
5456

5557
# HTTP port
5658
EXPOSE 8000

docker/start

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ start_query_node() {
5858
start_index_node() {
5959
# Only the index node with the name set in BLOCK_INGESTOR should ingest
6060
# blocks
61-
if [[ ${pod_name} != "${BLOCK_INGESTOR}" ]]; then
61+
if [[ ${node_id} != "${BLOCK_INGESTOR}" ]]; then
6262
export DISABLE_BLOCK_INGESTOR=true
6363
fi
6464

6565
graph-node \
66-
--node-id "${pod_name//-/_}" \
66+
--node-id "${node_id//-/_}" \
6767
--postgres-url "$postgres_url" \
6868
--ethereum-rpc $ethereum \
6969
--ipfs "$ipfs"
@@ -84,7 +84,7 @@ sleep 5
8484

8585
trap save_coredumps EXIT
8686

87-
export PGAPPNAME="${pod_name-$HOSTNAME}"
87+
export PGAPPNAME="${node_id-$HOSTNAME}"
8888

8989
case "${node_role-combined-node}" in
9090
query-node)

0 commit comments

Comments
 (0)