-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
35 lines (32 loc) · 841 Bytes
/
build.bat
File metadata and controls
35 lines (32 loc) · 841 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
32
33
34
35
@echo off
REM This script builds and runs the Docker Compose file based on the given argument: "prod" or "dev"
if "%~1"=="" (
echo No build mode specified.
echo Usage: %0 [prod^|dev]
pause
exit /b 1
)
set MODE=%~1
if /I "%MODE%"=="dev" (
if not exist compose.dev.yml (
echo Error: compose.dev.yml file not found!
pause
exit /b 1
)
echo Running Development Build...
docker compose -f compose.dev.yml up --build
) else if /I "%MODE%"=="prod" (
if not exist compose.yml (
echo Error: compose.yml file not found!
pause
exit /b 1
)
echo Running Production Build...
docker compose -f compose.yml up --build
) else (
echo Invalid build mode: %MODE%
echo Usage: %0 [prod^|dev]
pause
exit /b 1
)
pause