From 1014e3c7855df1c53d0bf0ef571d2cecd9b795f8 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 7 Jul 2023 01:23:47 +0200 Subject: [PATCH] Add default RPC port depending on Zcash network (#7162) The `runtime-entrypoint.sh` uses the `RPC_PORT` env var when the user specifies the `getblocktemplate-rpc` feature, but this env var is unset unless the user sets it. This commit sets the default values for `RPC_PORT` depending on `NETWORK`. --- docker/runtime-entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/runtime-entrypoint.sh b/docker/runtime-entrypoint.sh index 5eaeb7a4c..596cef19a 100755 --- a/docker/runtime-entrypoint.sh +++ b/docker/runtime-entrypoint.sh @@ -31,6 +31,11 @@ fi : "${TRACING_ENDPOINT_PORT:=3000}" # [rpc] : "${RPC_LISTEN_ADDR:=0.0.0.0}" +if [[ "${NETWORK}" = "Mainnet" ]]; then +: "${RPC_PORT:=8232}" +elif [[ "${NETWORK}" = "Testnet" ]]; then +: "${RPC_PORT:=18232}" +fi # Populate `zebrad.toml` before starting zebrad, using the environmental