Skip to content

Commit

Permalink
Merge pull request #23 from allora-network/cristian/add-worker-data-t…
Browse files Browse the repository at this point in the history
…o-gitigonore

Add worker-data directory to .gitignore
  • Loading branch information
conache authored Aug 9, 2024
2 parents c91082b + 18979ec commit 2a6b5cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ prices.db
/.venv11

truth-data
worker-data
.allorad
.cache
config.json
Expand Down
5 changes: 4 additions & 1 deletion init.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ if [ -n "$mnemonic" ]; then
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
Expand All @@ -35,7 +38,7 @@ 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"
Expand Down
File renamed without changes.

0 comments on commit 2a6b5cf

Please sign in to comment.