Skip to content

Commit

Permalink
Ports are configurable now
Browse files Browse the repository at this point in the history
  • Loading branch information
jasl committed Apr 6, 2023
1 parent 66963f8 commit e0f2b6c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build_and_push.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
BUILD_ONLY = false
GIT_TAG = "main"

COMMON_TAG = "v0.1.23-dev.4" # GIT_TAG
COMMON_TAG = "v0.1.23-dev.5" # GIT_TAG

KHALA_NODE_BIN_DOCKER_REPO = "khala-node-bin"
KHALA_NODE_BIN_DOCKER_TAG = COMMON_TAG
Expand Down
33 changes: 21 additions & 12 deletions dockerfile.d/start_node_new.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@ DATA_PATH="$HOME/data"
NODE_NAME="${NODE_NAME:-"khala-node"}"
NODE_ROLE="${NODE_ROLE:-""}"

PARACHAIN_PORT="${PARACHAIN_PORT:-"30333"}"
RELAYCHAIN_PORT="${RELAYCHAIN_PORT:-"30334"}"
PARACHAIN="${PARACHAIN:-"phala"}"
RELAYCHAIN="${RELAYCHAIN:-"polkadot"}"

PARACHAIN_DB="${PARACHAIN_DB:-"paritydb"}"
RELAYCHAIN_DB="${RELAYCHAIN_DB:-"paritydb"}"

PARACHAIN="${PARACHAIN:-"phala"}"
RELAYCHAIN="${RELAYCHAIN:-"polkadot"}"
PARACHAIN_LIBP2P_PORT="${PARACHAIN_PORT:-"30333"}"
RELAYCHAIN_LIBP2P_PORT="${RELAYCHAIN_PORT:-"30334"}"

PARACHAIN_PROMETHEUS_PORT="${PARACHAIN_PROMETHEUS_PORT:-"9615"}"
RELAYCHAIN_PROMETHEUS_PORT="${RELAYCHAIN_PROMETHEUS_PORT:-"9616"}"

PARACHAIN_HTTP_RPC_PORT="${PARACHAIN_HTTP_RPC_PORT:-"9933"}"
RELAYCHAIN_HTTP_RPC_PORT="${RELAYCHAIN_HTTP_RPC_PORT:-"9934"}"

PARACHAIN_WS_RPC_PORT="${PARACHAIN_WS_RPC_PORT:-"9944"}"
RELAYCHAIN_WS_RPC_PORT="${RELAYCHAIN_WS_RPC_PORT:-"9945"}"

case ${NODE_ROLE} in
"")
Expand Down Expand Up @@ -50,10 +59,10 @@ echo "Starting Khala node as role '${NODE_ROLE}' with extra parachain args '${PA
--base-path $DATA_PATH \
--database $PARACHAIN_DB \
--name $NODE_NAME \
--port $PARACHAIN_PORT \
--prometheus-port 9615 \
--rpc-port 9933 \
--ws-port 9944 \
--port $PARACHAIN_LIBP2P_PORT \
--prometheus-port $PARACHAIN_PROMETHEUS_PORT \
--rpc-port $PARACHAIN_HTTP_RPC_PORT \
--ws-port $PARACHAIN_WS_RPC_PORT \
--prometheus-external \
--ws-external \
--rpc-cors all \
Expand All @@ -63,10 +72,10 @@ echo "Starting Khala node as role '${NODE_ROLE}' with extra parachain args '${PA
-- \
--chain $RELAYCHAIN \
--database $RELAYCHAIN_DB \
--port $RELAYCHAIN_PORT \
--prometheus-port 9616 \
--rpc-port 9934 \
--ws-port 9945 \
--port $RELAYCHAIN_LIBP2P_PORT \
--prometheus-port $RELAYCHAIN_PROMETHEUS_PORT \
--rpc-port $RELAYCHAIN_HTTP_RPC_PORT \
--ws-port $RELAYCHAIN_WS_RPC_PORT \
--prometheus-external \
--ws-external \
--rpc-cors all \
Expand Down
18 changes: 18 additions & 0 deletions khala-node-with-launcher.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ ENV RELAYCHAIN="kusama"
ENV PARACHAIN_DB="paritydb"
ENV RELAYCHAIN_DB="paritydb"

ENV PARACHAIN="khala"
ENV RELAYCHAIN="kusama"

ENV PARACHAIN_DB="paritydb"
ENV RELAYCHAIN_DB="paritydb"

ENV PARACHAIN_LIBP2P_PORT="30333"
ENV RELAYCHAIN_LIBP2P_PORT="30334"

ENV PARACHAIN_PROMETHEUS_PORT="9615"
ENV RELAYCHAIN_PROMETHEUS_PORT="9616"

ENV PARACHAIN_HTTP_RPC_PORT="9933"
ENV RELAYCHAIN_HTTP_RPC_PORT="9934"

ENV PARACHAIN_WS_RPC_PORT="9944"
ENV RELAYCHAIN_WS_RPC_PORT="9945"

ENV PARACHAIN_EXTRA_ARGS=""
ENV RELAYCHAIN_EXTRA_ARGS=""

Expand Down
12 changes: 12 additions & 0 deletions phala-node-with-launcher.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ ENV RELAYCHAIN="polkadot"
ENV PARACHAIN_DB="paritydb"
ENV RELAYCHAIN_DB="paritydb"

ENV PARACHAIN_LIBP2P_PORT="30333"
ENV RELAYCHAIN_LIBP2P_PORT="30334"

ENV PARACHAIN_PROMETHEUS_PORT="9615"
ENV RELAYCHAIN_PROMETHEUS_PORT="9616"

ENV PARACHAIN_HTTP_RPC_PORT="9933"
ENV RELAYCHAIN_HTTP_RPC_PORT="9934"

ENV PARACHAIN_WS_RPC_PORT="9944"
ENV RELAYCHAIN_WS_RPC_PORT="9945"

ENV PARACHAIN_EXTRA_ARGS=""
ENV RELAYCHAIN_EXTRA_ARGS=""

Expand Down

0 comments on commit e0f2b6c

Please sign in to comment.