#!/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