-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstart.sh
More file actions
31 lines (22 loc) · 772 Bytes
/
start.sh
File metadata and controls
31 lines (22 loc) · 772 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
#!/bin/bash
# Startup script for Cloud Engineer Agent
# Runs both Streamlit application and health check server
set -e
echo "Starting Cloud Engineer Agent..."
# Start health check server in the background
echo "Starting health check server on port 8080..."
python health_check.py &
HEALTH_PID=$!
# Give health check server a moment to start
sleep 2
# Check if health check server started successfully
if ! ps -p $HEALTH_PID > /dev/null; then
echo "ERROR: Health check server failed to start"
exit 1
fi
echo "Health check server started (PID: $HEALTH_PID)"
echo "Starting Streamlit application on port 8501..."
# Start Streamlit in the foreground
streamlit run app.py
# If Streamlit exits, kill the health check server
kill $HEALTH_PID 2>/dev/null || true