File size: 1,135 Bytes
02422e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# start_sidecar.sh β€” Launch the GenAI Shield Sidecar standalone
#
# Usage:
#   ./start_sidecar.sh                     # default port 5050
#   SIDECAR_PORT=8080 ./start_sidecar.sh   # custom port
#   GEMINI_API_KEY=... ./start_sidecar.sh  # with API key inline

set -e

SIDECAR_PORT="${SIDECAR_PORT:-5050}"
LOG_LEVEL="${LOG_LEVEL:-info}"

echo "╔══════════════════════════════════════════════╗"
echo "β•‘   GenAI Shield Sidecar β€” Starting up         β•‘"
echo "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•"
echo ""
echo "  Port:     $SIDECAR_PORT"
echo "  Backend:  ${LLM_BACKEND:-gemini}"
echo "  UI:       http://localhost:$SIDECAR_PORT"
echo "  API Docs: http://localhost:$SIDECAR_PORT/docs"
echo ""

# Run from project root so imports resolve correctly
cd "$(dirname "$0")"

python -m uvicorn sidecar.app:app \
    --host 0.0.0.0 \
    --port "$SIDECAR_PORT" \
    --log-level "$LOG_LEVEL" \
    --no-access-log