Add ETH_PRIVATE_KEY to Docker entrypoint (#982)
* Add ETH_PRIVATE_KEY to Docker entrypoint * Add deprecation warning for PRIV_KEY variable Signed-off-by: Slava <20563034+veaceslavdoina@users.noreply.github.com> --------- Signed-off-by: Slava <20563034+veaceslavdoina@users.noreply.github.com>
This commit is contained in:
parent
3a734aff59
commit
2a4a37934c
|
@ -45,12 +45,16 @@ fi
|
||||||
|
|
||||||
# If marketplace is enabled from the testing environment,
|
# If marketplace is enabled from the testing environment,
|
||||||
# The file has to be written before Codex starts.
|
# The file has to be written before Codex starts.
|
||||||
if [ -n "${PRIV_KEY}" ]; then
|
for key in PRIV_KEY ETH_PRIVATE_KEY; do
|
||||||
echo ${PRIV_KEY} > "private.key"
|
keyfile="private.key"
|
||||||
chmod 600 "private.key"
|
if [[ -n "${!key}" ]]; then
|
||||||
export CODEX_ETH_PRIVATE_KEY="private.key"
|
[[ "${key}" == "PRIV_KEY" ]] && echo "PRIV_KEY variable is deprecated and will be removed in the next releases, please use ETH_PRIVATE_KEY instead!"
|
||||||
|
echo "${!key}" > "${keyfile}"
|
||||||
|
chmod 600 "${keyfile}"
|
||||||
|
export CODEX_ETH_PRIVATE_KEY="${keyfile}"
|
||||||
echo "Private key set"
|
echo "Private key set"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Circuit downloader
|
# Circuit downloader
|
||||||
# cirdl [circuitPath] [rpcEndpoint] [marketplaceAddress]
|
# cirdl [circuitPath] [rpcEndpoint] [marketplaceAddress]
|
||||||
|
|
Loading…
Reference in New Issue