Add run_dashboard.sh launcher script + auto warehouse export
- 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.
This commit is contained in:
Executable
+33
@@ -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
|
||||
Reference in New Issue
Block a user