From 1903f081ab4623478fb6320e59639dbdada10f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Wed, 7 Mar 2018 11:31:42 +0100 Subject: [PATCH] Docker: remove the parameter 'P2P_PORT' --- scripts/alphanet.sh | 4 +--- scripts/docker/entrypoint.inc.sh | 10 ++++------ scripts/docker/entrypoint.sh | 4 +--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/alphanet.sh b/scripts/alphanet.sh index 9d29be55e..cc8595579 100755 --- a/scripts/alphanet.sh +++ b/scripts/alphanet.sh @@ -42,7 +42,7 @@ services: node: image: $docker_image hostname: node - command: tezos-node $@ + command: tezos-node --net-addr :$port $@ ports: - "$port:$port"$export_rpc expose: @@ -51,8 +51,6 @@ services: - node_data:/var/run/tezos/node - client_data:/var/run/tezos/client restart: on-failure - environment: - - P2P_PORT=$port baker: image: $docker_image diff --git a/scripts/docker/entrypoint.inc.sh b/scripts/docker/entrypoint.inc.sh index b0a6cf4b0..c99b5fb51 100644 --- a/scripts/docker/entrypoint.inc.sh +++ b/scripts/docker/entrypoint.inc.sh @@ -7,11 +7,11 @@ configure_client() { if [ ! -f "$client_config" ]; then "$client" --base-dir "$client_dir" \ - --addr "$NODE_HOST" --port "$RPC_PORT" \ + --addr "$NODE_HOST" --port "$NODE_RPC_PORT" \ config init --output "$client_config" >/dev/null 2>&1 else "$client" --base-dir "$client_dir" \ - --addr "$NODE_HOST" --port "$RPC_PORT" \ + --addr "$NODE_HOST" --port "$NODE_RPC_PORT" \ config update >/dev/null 2>&1 fi @@ -49,15 +49,13 @@ launch_node() { echo "Configuring the node..." "$node" config init \ --data-dir "$node_dir" \ - --net-addr ":$P2P_PORT" \ - --rpc-addr ":$RPC_PORT" \ + --rpc-addr ":$NODE_RPC_PORT" \ "$@" else echo "Updating the node configuration..." "$node" config update \ --data-dir "$node_dir" \ - --net-addr ":$port" \ - --rpc-addr ":$RPC_PORT" \ + --rpc-addr ":$NODE_RPC_PORT" \ "$@" fi diff --git a/scripts/docker/entrypoint.sh b/scripts/docker/entrypoint.sh index 1f78dbcc4..f17db5463 100755 --- a/scripts/docker/entrypoint.sh +++ b/scripts/docker/entrypoint.sh @@ -7,9 +7,7 @@ bin_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")" : ${DATA_DIR:="/var/run/tezos"} : ${NODE_HOST:="node"} - -: ${P2P_PORT:="9732"} -: ${RPC_PORT:="8732"} +: ${NODE_RPC_PORT:="8732"} node="/usr/local/bin/tezos-node" client="/usr/local/bin/tezos-client"