Research-Stack/4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh
allaun ab6fe3e69b fix(infra): purge all default AWS RDS hosts and IAM credentials
- Replaced database-1-instance-1.cghu8yqogqwo.us-east-1.rds.amazonaws.com
  with 'localhost' as default.
- Removed AWS IAM generate-db-auth-token CLI subprocessing and boto3
  token generation blocks from rds_connect.py, ingest_flexure_joints.py,
  pist_route_repair.py, and ene-api-wrapper.sh.
- Purged AWS DEFAULT_REGION and AWS_REGION configurations where applicable.
- Updated Rust rds_probe to use standard PG environment variables.

Build: 0 jobs, 0 errors (lake build)
2026-06-18 23:26:56 -05:00

23 lines
571 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
ROOT="/home/allaun/Research Stack/4-Infrastructure/infra/ene-rds"
BIN="${ENE_API_BIN:-$ROOT/target/release/ene-api}"
if [[ ! -x "$BIN" ]]; then
BIN="$ROOT/target/debug/ene-api"
fi
if [[ ! -x "$BIN" ]]; then
echo "ene-api binary not found; run: cargo build --release -p ene-api" >&2
exit 127
fi
export RDS_HOST="${RDS_HOST:-localhost}"
export RDS_PORT="${RDS_PORT:-5432}"
export RDS_USER="${RDS_USER:-postgres}"
export RDS_DB="${RDS_DB:-postgres}"
export ENE_API_BIND="${ENE_API_BIND:-0.0.0.0:3000}"
cd "$ROOT"
exec "$BIN"