Add build.sh and run.sh scripts for osiris runner

- Added build.sh that builds runner_osiris binary in release mode
- Added run.sh that builds first, then starts the runner
- Fixed binary name from osiris_runner to runner_osiris
- Scripts use RUSTFLAGS to suppress warnings
- Runner configured via environment variables (RUNNER_ID, REDIS_URL, BASE_DB_ID)
This commit is contained in:
Timur Gordon
2025-11-04 17:05:17 +01:00
parent 0c168690a6
commit 35ea035bd5
5 changed files with 64 additions and 3 deletions

11
scripts/build.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PROJECT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
echo "Building Osiris Runner..."
cd "$PROJECT_DIR"
RUSTFLAGS="-A warnings" cargo build --release --bin runner_osiris
echo "✅ Osiris Runner built successfully"

23
scripts/run.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PROJECT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
# Build first
"$SCRIPT_DIR/build.sh"
# Configuration
RUNNER_ID="${RUNNER_ID:-osiris}"
REDIS_URL="${REDIS_URL:-redis://localhost:6379}"
BASE_DB_ID="${BASE_DB_ID:-1}"
LOG_LEVEL="${LOG_LEVEL:-info}"
echo "Starting Osiris Runner..."
cd "$PROJECT_DIR"
RUST_LOG="$LOG_LEVEL" RUST_LOG_STYLE=never \
exec target/release/runner_osiris \
--redis-url "$REDIS_URL" \
--base-db-id "$BASE_DB_ID" \
"$RUNNER_ID"