@echo off
echo Starting v2-Docker System...
echo.

cd /d "%~dp0"

echo Checking Docker status...
docker version >nul 2>&1
if %errorlevel% neq 0 (
    echo ERROR: Docker is not running or not installed!
    echo Please start Docker Desktop first.
    pause
    exit /b 1
)

echo Starting services...
docker-compose -f v2/docker-compose.yaml up -d

echo.
echo Waiting for services to start...
timeout /t 10 /nobreak >nul

echo.
echo Checking service status...
docker-compose -f v2/docker-compose.yaml ps

echo.
echo ========================================
echo Services started successfully!
echo.
echo Admin Panel: http://localhost
echo License API: http://localhost/api
echo ========================================
echo.
echo Press any key to exit...
pause >nul