Add init.config file
This commit is contained in:
parent
cbbf05621f
commit
fd9a5b7ac4
@ -28,8 +28,8 @@ A complete working example is provided in the `docker-compose.yml` file.
|
||||
|
||||
Run the following commands from the project's root directory to initialize the worker:
|
||||
```sh
|
||||
chmod +x init.docker
|
||||
./init.docker
|
||||
chmod +x init.config
|
||||
./init.config
|
||||
```
|
||||
These commands will:
|
||||
- Automatically create Allora keys for your worker.
|
||||
|
@ -9,7 +9,20 @@ fi
|
||||
|
||||
nodeName=$(jq -r '.wallet.addressKeyName' config.json)
|
||||
if [ -z "$nodeName" ]; then
|
||||
echo "No name was provided for the node, please provide value for wallet.addressKeyName in the config.json"
|
||||
echo "No wallet name provided for the node, please provide your preferred wallet name. config.json >> wallet.addressKeyName"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
json_content=$(cat ./config.json)
|
||||
stringified_json=$(echo "$json_content" | jq -c .)
|
||||
|
||||
mnemonic=$(jq -r '.wallet.addressRestoreMnemonic' config.json)
|
||||
if [ -n "$mnemonic" ]; then
|
||||
echo "ALLORA_OFFCHAIN_NODE_CONFIG_JSON='$stringified_json'" > ./worker-data/env_file
|
||||
echo "NAME=$nodeName" >> ./worker-data/env_file
|
||||
echo "ENV_LOADED=true" >> ./worker-data/env_file
|
||||
|
||||
echo "wallet mnemonic already provided by you, loading config.json . Please proceed to run docker compose"
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user