cc983963d4
* Compile & copy wg probe * Node status agent WIP * Enable debug logging * Agent submits results - add clap to agent - agent runs network probe - /submit endpoint on NS API * Build clients with timeouts * Update logging and dev scripts * Replace /blaclisted endpoint * Testruns fully functional - task that queues testruns periodically - testruns read/write in DB * Probe scores fully working - testruns are assigned on API - submit updates testruns correctly on NS API side - agent registers with API - agent submits results correctly * Clippy fixes * PR feedback * Clippy again * PR feedback * Run clippy earlier in CI * Make refresh delay configurable in server & agent
40 lines
915 B
Bash
Executable File
40 lines
915 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
export RUST_LOG=${RUST_LOG:-debug}
|
|
|
|
export NYM_API_CLIENT_TIMEOUT=60
|
|
export EXPLORER_CLIENT_TIMEOUT=60
|
|
|
|
export ENVIRONMENT="mainnet.env"
|
|
|
|
function run_bare() {
|
|
# export necessary env vars
|
|
set -a
|
|
source ../envs/$ENVIRONMENT
|
|
set +a
|
|
export RUST_LOG=debug
|
|
|
|
# --conection-url is provided in build.rs
|
|
cargo run --package nym-node-status-api
|
|
}
|
|
|
|
function run_docker() {
|
|
cargo build --package nym-node-status-api --release
|
|
cp ../target/release/nym-node-status-api .
|
|
|
|
cd ..
|
|
docker build -t node-status-api -f nym-node-status-api/Dockerfile.dev .
|
|
docker run --env-file envs/${ENVIRONMENT} \
|
|
-e EXPLORER_CLIENT_TIMEOUT=$EXPLORER_CLIENT_TIMEOUT \
|
|
-e NYM_API_CLIENT_TIMEOUT=$NYM_API_CLIENT_TIMEOUT \
|
|
-e DATABASE_URL="sqlite://node-status-api.sqlite?mode=rwc" \
|
|
-e RUST_LOG=${RUST_LOG} node-status-api
|
|
|
|
}
|
|
|
|
run_bare
|
|
|
|
# run_docker
|