chartbastan/backend/start_all.bat
2026-02-01 09:31:38 +01:00

103 lines
2.7 KiB
Batchfile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
REM ========================================
REM SCRIPT PRINCIPAL CHARTBASTAN
REM ========================================
echo.
echo ============================================================
echo 🚀 SYSTÈME CHARTBASTAN - MENU PRINCIPAL
echo ============================================================
echo.
echo 📋 OPTIONS DISPONIBLES:
echo.
echo 1⃣ Initialiser la base de données avec des matchs de test
echo 2⃣ Simuler le pipeline complet (scraping → analyse → énergie → prédictions)
echo 3⃣ Vérifier la connexion RabbitMQ
echo 4⃣ Lancer le serveur FastAPI uniquement
echo 0⃣ Tout lancer (matchs + pipeline + API)
echo.
echo 📝 CONFIGURATION:
echo - Variables d'environnement dans backend\.env
echo - RabbitMQ doit être lancé avec Docker AVANT d'utiliser les queues
echo - API externe (Twitter/Reddit) optionnelle pour scraping réel
echo.
echo 🚀 DOCKER RABBITMQ (si nécessaire):
echo docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
echo.
echo ============================================================
set /p choice=
if "%choice%"=="1" (
echo.
echo 1⃣ Initialisation de la base de données...
echo.
cd backend
python run_all_system.py
)
if "%choice%"=="2" (
echo.
echo 2⃣ Simulation du pipeline complet...
echo.
cd backend
python run_all_system.py
)
if "%choice%"=="3" (
echo.
echo 3⃣ Vérification RabbitMQ...
echo.
cd backend
python run_all_system.py
)
if "%choice%"=="4" (
echo.
echo 4⃣ Démarrage du serveur FastAPI...
echo.
cd backend
echo 🚀 Démarrage du serveur FastAPI...
echo 🌐 Serveur prêt sur: http://127.0.0.1:8000
echo 📖 Documentation: http://127.0.0.1:8000/docs
echo.
python -m uvicorn app.app_new:app --host 127.0.0.1 --port 8000 --reload
)
if "%choice%"=="0" (
echo.
echo 0⃣ Lancement complet du système...
echo.
echo 📊 Étape 1/3: Initialisation de la base de données
echo.
cd backend
python run_all_system.py
echo.
echo ---------------------------------------------------------
echo 🔄 Étape 2/3: Simulation du pipeline complet
echo.
python run_all_system.py
echo.
echo ---------------------------------------------------------
echo 🚀 Étape 3/3: Démarrage du serveur FastAPI
echo.
echo 🌐 Serveur prêt sur: http://127.0.0.1:8000
echo 📖 Documentation: http://127.0.0.1:8000/docs
echo.
cd backend
python -m uvicorn app.app_new:app --host 127.0.0.1 --port 8000 --reload
)
if "%choice%"=="" (
echo.
echo ❌ Option invalide. Veuillez choisir entre 0 et 4.
goto :end
)
:end
echo.
pause