-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhealth-dashboard.sh
More file actions
51 lines (42 loc) · 1.5 KB
/
Copy pathhealth-dashboard.sh
File metadata and controls
51 lines (42 loc) · 1.5 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Health Dashboard Starter Script for Linux/Mac (uv-based).
echo "============================================================"
echo " 🦙 CrawlLama Health Dashboard Starter"
echo "============================================================"
echo ""
# Get script directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# uv manages the environment from pyproject.toml + uv.lock.
if ! command -v uv &> /dev/null; then
echo "❌ [ERROR] uv is not installed!"
echo ""
echo "Install it with:"
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
echo "Then provision the environment:"
echo " ./setup.sh"
echo ""
exit 1
fi
# Relocate the venv off symlink-incapable shared folders (vboxsf/vmhgfs).
source "$SCRIPT_DIR/scripts/uv-env.sh"
crawllama_setup_uv_env "$SCRIPT_DIR"
echo "🚀 Starting Health Dashboard..."
echo ""
# `uv run` ensures the venv exists and matches uv.lock before launching.
uv run python health-dashboard.py
# Capture exit code
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo ""
echo "============================================================"
echo "❌ Dashboard exited with an error (code: $EXIT_CODE)"
echo "============================================================"
echo ""
exit $EXIT_CODE
fi
echo ""
echo "============================================================"
echo "✅ Dashboard closed successfully."
echo "============================================================"
echo ""