@echo off
cd /d "%~dp0"
echo ==============================================
echo [RUP Project] Cleaning and Rebuilding Backend
echo ==============================================

echo 1. Stopping Docker services...
docker compose down

echo.
echo 2. Forcing removal of old backend image (to clear cache)...
docker image rm -f rup-backend

echo.
echo 3. Rebuilding Docker containers...
docker compose up -d --build

echo.
echo 4. Checking logs (Press Ctrl+C to exit log view)...
echo ==============================================
docker compose logs -f backend

pause
