-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-backend.sh
More file actions
executable file
·32 lines (26 loc) · 856 Bytes
/
start-backend.sh
File metadata and controls
executable file
·32 lines (26 loc) · 856 Bytes
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
#!/bin/bash
# Start backend with full WebRTC logging
cd /home/rodrigo/agentic/backend
source venv/bin/activate
# Load .env file if exists
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
echo "✓ Loaded environment from .env"
fi
# Check OPENAI_API_KEY
if [ -z "$OPENAI_API_KEY" ]; then
echo "⚠️ OPENAI_API_KEY not set"
echo "Set it with: export OPENAI_API_KEY=sk-proj-..."
echo "Or add to backend/.env file"
echo ""
fi
# Export debug logging
export LOG_LEVEL=DEBUG
echo "=== Backend Starting ==="
echo "URL: http://localhost:8000"
echo "WebRTC endpoint: POST /api/realtime/webrtc/bridge"
echo "Watch for: [WebRTC] [aiortc] [OpenAI] logs"
echo ""
# Start uvicorn with logging to both console and file
mkdir -p /tmp/agentic-logs
uvicorn main:app --host 0.0.0.0 --port 8000 2>&1 | tee /tmp/agentic-logs/backend.log