Compare commits

..

2 Commits

Author SHA1 Message Date
vvzvlad
9ba8bba8f5 new updater 2024-09-06 15:52:51 +03:00
vvzvlad
20ae1db9fd update env/cfg 2024-09-06 15:23:36 +03:00
5 changed files with 33 additions and 15 deletions

7
.env Normal file
View File

@ -0,0 +1,7 @@
TOKEN=###TOKEN###
TRAINING_DAYS=###TRAINING_DAYS###
TIMEFRAME=###TIMEFRAME###
MODEL=###MODEL###
REGION=EU
DATA_PROVIDER=###DATA_PROVIDER###
CG_API_KEY=###CG_API_KEY###

View File

@ -1,7 +0,0 @@
TOKEN=
TRAINING_DAYS=
TIMEFRAME=
MODEL=
REGION=
DATA_PROVIDER=
CG_API_KEY=

2
.gitignore vendored
View File

@ -8,12 +8,10 @@ logs/*
inference-data inference-data
worker-data worker-data
config.json
/data /data
**/*.venv* **/*.venv*
**/.cache **/.cache
**/.env
**/env_file **/env_file
**/.gitkeep* **/.gitkeep*
**/*.csv **/*.csv

View File

@ -1,13 +1,13 @@
{ {
"wallet": { "wallet": {
"addressKeyName": "test", "addressKeyName": "###WALLET###",
"addressRestoreMnemonic": "", "addressRestoreMnemonic": "###MNEMONIC###",
"alloraHomeDir": "", "alloraHomeDir": "",
"gas": "auto", "gas": "auto",
"gasAdjustment": 1.5, "gasAdjustment": 1.5,
"nodeRpc": "https://allora-rpc.testnet.allora.network", "nodeRpc": "###RPC_URL###",
"maxRetries": 1, "maxRetries": 5,
"delay": 1, "delay": 10,
"submitTx": true "submitTx": true
}, },
"worker": [ "worker": [
@ -17,7 +17,7 @@
"loopSeconds": 5, "loopSeconds": 5,
"parameters": { "parameters": {
"InferenceEndpoint": "http://inference:8000/inference/{Token}", "InferenceEndpoint": "http://inference:8000/inference/{Token}",
"Token": "ETH" "Token": "###TOKEN###"
} }
} }
] ]

20
update.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <PARAMETER> <NEW_VALUE>"
exit 1
fi
PARAMETER=$1
NEW_VALUE=$2
# Список файлов
FILES=(
"./config.json"
".env"
)
for FILE in "${FILES[@]}"; do
EXPANDED_FILE=$(eval echo "$FILE")
sed -i "s|###$PARAMETER###|$NEW_VALUE|g" "$EXPANDED_FILE"
done