Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kant777 authored Jan 13, 2024
1 parent e75c17b commit 3ce0eff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions geth-poa/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,19 @@ fi

# Obtain assigned container IP for p2p
NODE_IP=${NODE_IP:-$(hostname -i)}
echo "NODE_IP is set to: $NODE_IP"

PUBLIC_NODE_IP=${PUBLIC_NODE_IP:-""}
echo "EXTERNAL_NODE_IP is set to: $PUBLIC_NODE_IP"

if [ -n "${PUBLIC_NODE_IP:-}" ]; then
# Set NAT_FLAG based on whether PUBLIC_NODE_IP is empty or not
if [ -n "$PUBLIC_NODE_IP" ]; then
NAT_FLAG="--nat=extip:$PUBLIC_NODE_IP"
else
NAT_FLAG="--nat=none"
fi


# (Optional) Echo the values for verification
echo "NODE_IP is set to: $NODE_IP"
echo "EXTERNAL_NODE_IP is set to: $PUBLIC_NODE_IP"

if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
echo "Starting bootnode"
Expand Down

0 comments on commit 3ce0eff

Please sign in to comment.