-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.bat
43 lines (33 loc) · 1.07 KB
/
run.bat
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
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
REM Navegar al directorio que contiene el docker-compose.yml
cd src || exit /b 1
@echo off
REM Verificar si las imágenes existen
docker images | findstr "my-router-image" >nul
if %ERRORLEVEL% NEQ 0 (
echo "Construyendo la imagen my-router-image..."
docker-compose build router
)
docker images | findstr "my-backend-image" >nul
if %ERRORLEVEL% NEQ 0 (
echo "Construyendo la imagen my-backend-image..."
docker-compose build backend
)
docker images | findstr "my-frontend1-image" >nul
if %ERRORLEVEL% NEQ 0 (
echo "Construyendo la imagen my-frontend1-image..."
docker-compose build frontend1
)
docker images | findstr "my-frontend2-image" >nul
if %ERRORLEVEL% NEQ 0 (
echo "Construyendo la imagen my-frontend2-image..."
docker-compose build frontend2
)
REM Levantar los contenedores sin volver a construir las imágenes
docker-compose up
REM Dar tiempo para que los contenedores se levanten
timeout /t 10
REM Abrir el navegador para el frontend1
start http://localhost:3000
REM Abrir el navegador para el frontend2
start http://localhost:3001