From 989edd1cde042041db4ae4f42c2b93ff0153534f Mon Sep 17 00:00:00 2001 From: Eric Mastro Date: Fri, 5 May 2023 15:35:24 +1000 Subject: [PATCH] [docker] modify startCodex.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - include overridden node name in log output if specified in test - quote `—log-level` value so that multiple log levels can be specified - ensure any CLI parameter env vars are passed through to the codex binary, instead of conditionally including them - add `—persistence` - add `—validator` --- docker/startCodex.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/startCodex.sh b/docker/startCodex.sh index 908df10c..03240f9c 100644 --- a/docker/startCodex.sh +++ b/docker/startCodex.sh @@ -6,9 +6,9 @@ echo "Starting Codex node$NAME" args="" -## Using local ip as NAT -nat_addr=$(ifconfig eth0 | awk '/inet/ {gsub("addr:", "", $2); print $2}') -echo "Local IP: $nat_addr" +## local ip as NAT? +do_nat=$(hostname -i) +echo "got nat:$do_nat" # Required arguments if [ -n "$LISTEN_ADDRS" ]; then @@ -48,8 +48,10 @@ if [ -n "$METRICS_ADDR" ] && [ -n "$METRICS_PORT" ]; then fi # NAT -echo "NAT: $nat_addr" -args="$args --nat=$nat_addr" +if [ -n "$NAT_IP" ]; then + echo "NAT: $NAT_IP" + args="$args --nat=$NAT_IP" +fi # Discovery IP if [ -n "$DISC_IP" ]; then @@ -111,10 +113,9 @@ if [ -n "$CACHE_SIZE" ]; then args="$args --cache-size=$CACHE_SIZE" fi -# Ethereum persistence if [ -n "$ETH_PROVIDER" ]; then - echo "Provider: $ETH_PROVIDER" - args="$args --eth-provider=$ETH_PROVIDER" + echo "Ethereum provider: $ETH_PROVIDER" + args="$args --eth-provider=$ETH_PROVIDER" fi if [ -n "$ETH_ACCOUNT" ]; then