Docker: remove the parameter 'P2P_PORT'

This commit is contained in:
Grégoire Henry 2018-03-07 11:31:42 +01:00
parent b8f8b598cd
commit 1903f081ab
3 changed files with 6 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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"