diff --git a/run_dashboard.sh b/run_dashboard.sh new file mode 100755 index 0000000..15e870a --- /dev/null +++ b/run_dashboard.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Fantabeto 26/27 Dashboard Launcher +# Usage: ./run_dashboard.sh [port] +set -e + +PORT=${1:-8501} +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" + +echo "============================================" +echo " Fantabeto 26/27 — Project Al-Cihred" +echo " Dashboard starting on port $PORT" +echo "============================================" +echo "" + +# Export warehouse if needed +if [ ! -f "$SCRIPT_DIR/data/warehouse/players.parquet" ]; then + echo "[init] Exporting warehouse data..." + python -m src.export.warehouse + echo "" +fi + +echo "[server] Starting Streamlit..." +echo " Local: http://localhost:$PORT" +echo " Network: http://$(hostname -I | awk '{print $1}'):$PORT" +echo "" +echo "Press Ctrl+C to stop." +echo "" + +cd "$SCRIPT_DIR" +exec python -m streamlit run dashboard/app.py \ + --server.port "$PORT" \ + --server.headless true \ + --server.enableStaticServing true