Skip to content

Commit

Permalink
Chore configurable launch mmode (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielMartinezRodriguez authored Sep 25, 2023
1 parent 4e52154 commit 2f528b5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docker/client/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ fi

if [[ "$CHAIN_TARGET" == "dev" ]]; then
echo "Starting dev chain"
./target/release/stability --base-path /tmp/node --dev --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --pruning archive --prometheus-external
START_COMMAND_DEV="./target/release/stability --base-path /tmp/node --dev --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --prometheus-external"

if [ "$MODE" = "archive" ]; then
START_COMMAND_DEV="$START_COMMAND_DEV --pruning archive"
fi
eval $START_COMMAND_DEV
exit 0
fi

Expand All @@ -31,7 +36,11 @@ if [ -n "$SEED" ]; then
--key-type gran
fi

START_COMMAND="./target/release/stability --base-path /tmp/node --validator --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --pruning archive --prometheus-external --chain=$CHAIN_TARGET"
START_COMMAND="./target/release/stability --base-path /tmp/node --validator --unsafe-rpc-external --rpc-cors all --unsafe-ws-external --prometheus-external --chain=$CHAIN_TARGET"

if [ "$MODE" = "archive" ]; then
START_COMMAND="$START_COMMAND --pruning archive"
fi

if [ -n "$NODE_KEY" ]; then
START_COMMAND="$START_COMMAND --node-key $NODE_KEY"
Expand Down

0 comments on commit 2f528b5

Please sign in to comment.