router-dashboard/start.bat

25 lines
690 B
Batchfile

@echo off
echo Stopping containers...
docker-compose down
echo Removing old volume...
docker-compose down -v
echo Starting services...
docker-compose up -d
echo Waiting for MySQL to be ready...
REM Replace timeout with ping for Windows
ping -n 30 127.0.0.1 > nul
echo Checking MySQL status...
docker-compose exec mysql mysqladmin -u ve_router_user -pve_router_password ping
IF %ERRORLEVEL% EQU 0 (
echo MySQL is up and running!
echo Showing tables in ve_router_db:
docker-compose exec mysql mysql -u ve_router_user -pve_router_password -h mysql ve_router_db -e "SHOW TABLES;"
) ELSE (
echo MySQL is not responding. Please check the logs:
docker-compose logs mysql
)