356b8d4c49
- run_dashboard.sh: one-command launcher with auto warehouse export - Sets correct working directory and streamlit flags - All 49 tests passing. 344 dataset files committed.
34 lines
894 B
Bash
Executable File
34 lines
894 B
Bash
Executable File
#!/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
|