Merge pull request #14 from allora-network/cristian/add-worker-data-to-gitigonore
Add worker-data directory to .gitignore
This commit is contained in:
commit
124872295a
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,7 @@ logs/*
|
||||
.allorad
|
||||
.cache
|
||||
inference-data
|
||||
worker-data
|
||||
|
||||
config.json
|
||||
env
|
||||
|
@ -42,4 +42,4 @@ services:
|
||||
|
||||
volumes:
|
||||
inference-data:
|
||||
worker-data:
|
||||
worker-data:
|
@ -21,11 +21,13 @@ 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
|
||||
|
||||
# Ensure the worker-data directory exists
|
||||
mkdir -p ./worker-data
|
||||
|
||||
if [ ! -f ./worker-data/env_file ]; then
|
||||
echo "ENV_LOADED=false" > ./worker-data/env_file
|
||||
fi
|
||||
@ -34,9 +36,8 @@ ENV_LOADED=$(grep '^ENV_LOADED=' ./worker-data/env_file | cut -d '=' -f 2)
|
||||
if [ "$ENV_LOADED" = "false" ]; then
|
||||
json_content=$(cat ./config.json)
|
||||
stringified_json=$(echo "$json_content" | jq -c .)
|
||||
|
||||
docker run -it --entrypoint=bash -v $(pwd)/worker-data:/data -e NAME="${nodeName}" -e ALLORA_OFFCHAIN_NODE_CONFIG_JSON="${stringified_json}" alloranetwork/allora-chain:latest -c "bash /data/scripts/init.sh"
|
||||
docker run -it --entrypoint=bash -v $(pwd)/worker-data:/data -v $(pwd)/scripts:/scripts -e NAME="${nodeName}" -e ALLORA_OFFCHAIN_NODE_CONFIG_JSON="${stringified_json}" alloranetwork/allora-chain:latest -c "bash /scripts/init.sh"
|
||||
echo "config.json saved to ./worker-data/env_file"
|
||||
else
|
||||
echo "config.json is already loaded, skipping the operation. You can set ENV_LOADED variable to false in ./worker-data/env_file to reload the config.json"
|
||||
fi
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
ALLORA_OFFCHAIN_NODE_CONFIG_JSON='{"wallet":{"addressKeyName":"test-basic","addressRestoreMnemonic":"your mnemonic will go here","alloraHomeDir":"","gas":"1000000","gasAdjustment":1,"nodeRpc":"https://allora-rpc.devnet.behindthecurtain.xyz","maxRetries":1,"delay":1,"submitTx":false},"worker":[{"topicId":1,"inferenceEntrypointName":"api-worker-reputer","loopSeconds":5,"parameters":{"InferenceEndpoint":"http://inference:8000/inference/{Token}","Token":"ETH"}}]}'
|
||||
NAME=test-basic
|
||||
ENV_LOADED=true
|
Loading…
Reference in New Issue
Block a user