forked from mtusi2026/mtusi2026lab6
13 lines
351 B
Batchfile
13 lines
351 B
Batchfile
@echo off
|
|
cd /d "%~dp0\.."
|
|
if "%TARGET_INSTANCE_ID%"=="" (
|
|
echo TARGET_INSTANCE_ID is required >&2
|
|
exit /b 1
|
|
)
|
|
if /I not "%TARGET_INSTANCE_ID%"=="api1" if /I not "%TARGET_INSTANCE_ID%"=="api2" (
|
|
echo unknown TARGET_INSTANCE_ID: %TARGET_INSTANCE_ID% >&2
|
|
exit /b 1
|
|
)
|
|
docker compose --env-file .env stop %TARGET_INSTANCE_ID%
|
|
exit /b %ERRORLEVEL%
|