Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Commit

Permalink
docker: make ports configurable (#409)
Browse files Browse the repository at this point in the history
* docker: make ports configurable

* fix variable name
  • Loading branch information
jonreiter authored Feb 27, 2024
1 parent c499bf5 commit 7d61f81
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions docker/chainnode/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
# - NETWORK_ID (default to 2021)
# - GASPRICE (default to 0)
# - FORCE_INIT (default to 'true')
# - NETWORK_PORT (default to 30303)
# - HTTP_PORT (default to 8545)
# - WS_PORT (default to 8546)

# constants
datadir="/ronin/data"
KEYSTORE_DIR="/ronin/keystore"
PASSWORD_FILE="/ronin/password"
BLS_PASSWORD_FILE="/ronin/bls_password"
BLS_PRIVATE_KEY_DIR="/ronin/bls_keystore"
network_port=30303
http_port=8545
ws_port=8546

# variables
genesisPath=""
Expand All @@ -30,6 +36,18 @@ if [[ ! -z $DATA_DIR ]]; then
datadir="$DATA_DIR"
fi

if [[ ! -z $NETWORK_PORT ]]; then
network_port="$NETWORK_PORT"
fi

if [[ ! -z $HTTP_PORT ]]; then
http_port="$HTTP_PORT"
fi

if [[ ! -z $WS_PORT ]]; then
ws_port="$WS_PORT"
fi

# networkid
if [[ ! -z $NETWORK_ID ]]; then
case $NETWORK_ID in
Expand Down Expand Up @@ -316,17 +334,17 @@ exec ronin $params \
--syncmode $syncmode \
--verbosity $VERBOSITY \
--datadir $datadir \
--port 30303 \
--port $network_port \
--txpool.globalqueue 10000 \
--txpool.globalslots 10000 \
--http \
--http.corsdomain "*" \
--http.addr 0.0.0.0 \
--http.port 8545 \
--http.port $http_port \
--http.vhosts "*" \
--ws \
--ws.addr 0.0.0.0 \
--ws.port 8546 \
--ws.port $ws_port \
--ws.origins "*" \
--allow-insecure-unlock \
--miner.gastarget "100000000" \
Expand Down

0 comments on commit 7d61f81

Please sign in to comment.