besu-hpc/entrypoint.sh
Sofiane Gerhardt b4a4842338 First commit
2024-10-21 10:50:05 +02:00

31 lines
998 B
Bash

#!/bin/bash
echo $CONFIGFILE | base64 --decode >> /config/config.toml
echo $GENESISFILE | base64 --decode >> /config/genesis.json
echo $LOGCONFIGFILE | base64 --decode >> /config/log-config.xml
echo $STATICNODESFILE | base64 --decode >> /config/static-nodes.json
if [[ -z "${NODEKEY}" ]]; then
echo "Key is not set"
else
echo $NODEKEY | base64 --decode > /opt/besu/data/key
fi
if [[ -z "${PERMISSIONSFILE}" ]]; then
echo "Permissions File not set"
else
echo $PERMISSIONSFILE | base64 --decode >> /config/permissions_config.toml
fi
/opt/besu/bin/besu \
--config-file=/config/config.toml \
--genesis-file=/config/genesis.json \
--nat-method="$NATMETHOD" \
--p2p-port="$P2PPORT" \
--p2p-host="$P2PHOST" \
--rpc-http-port="$RPCHTTPPORT" \
--rpc-ws-port="$RPCWSPORT" \
--graphql-http-port="$GRAPHQLHTTPPORT" \
--logging="$LOGGING" \
--sync-mode="$SYNCMODE" \
--node-private-key-file=/opt/besu/data/key;