Skip to content

Commit

Permalink
entrypoint: add DB_ENGINE environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
minh-bq committed Jan 4, 2024
1 parent ae9ed21 commit dee6db8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docker/chainnode/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@ if [[ ! -z $GENESIS_PATH ]]; then
genesisPath="$GENESIS_PATH"
fi

if [[ "$DB_ENGINE" != "" ]]; then
dbEngine="--db.engine $DB_ENGINE"
params="$params $dbEngine"
fi

# data dir
if [[ ! -d $datadir/ronin ]]; then
echo "No blockchain data, creating genesis block."
ronin init $genesisPath --datadir $datadir 2> /dev/null
ronin init $dbEngine --datadir $datadir $genesisPath 2> /dev/null
elif [[ "$FORCE_INIT" = "true" && "$INIT_FORCE_OVERRIDE_CHAIN_CONFIG" = "true" ]]; then
echo "Forcing update chain config with force overriding chain config."
ronin init $genesisPath --overrideChainConfig --datadir $datadir 2> /dev/null
ronin init $dbEngine --overrideChainConfig --datadir $datadir $genesisPath 2> /dev/null
elif [ "$FORCE_INIT" = "true" ]; then
echo "Forcing update chain config."
ronin init $genesisPath --datadir $datadir 2> /dev/null
ronin init $dbEngine --datadir $datadir $genesisPath 2> /dev/null
fi

# password file
Expand Down

0 comments on commit dee6db8

Please sign in to comment.