-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_all.bat
More file actions
31 lines (25 loc) · 943 Bytes
/
start_all.bat
File metadata and controls
31 lines (25 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
REM start_all.bat - builds docker server + mongo, then opens client window
cd /d "%~dp0"
REM Ensure Docker is running
echo Starting docker-compose (mongo + server)...
docker-compose up --build -d
if %ERRORLEVEL% NEQ 0 (
echo Docker compose failed. Make sure Docker Desktop is running.
pause
exit /b 1
)
REM give server a few seconds to start
echo Waiting for server to boot (3s)...
timeout /t 3 /nobreak >nul
REM Start local client in a new window (uses local venv)
if not exist ".venv\Scripts\activate.bat" (
echo Virtualenv not found - creating .venv...
py -m venv .venv
echo Installing requirements...
.venv\Scripts\activate.bat & pip install -r requirements.txt
)
REM open client in new cmd window
start "" cmd /k "cd /d \"%~dp0\" & .venv\Scripts\activate.bat & echo Running client... & python -m client.cli"
echo Done. Two windows should be open: server runs inside docker, client as local window.
exit /b 0