12 lines
327 B
Batchfile
12 lines
327 B
Batchfile
@echo off
|
|
cd /d "%~dp0.."
|
|
if "%TARGET_INSTANCE_ID%"=="api1" goto stop
|
|
if "%TARGET_INSTANCE_ID%"=="api2" goto stop
|
|
echo Expected TARGET_INSTANCE_ID=api1 or api2
|
|
exit /b 2
|
|
:stop
|
|
docker compose --env-file .env stop -t 3 %TARGET_INSTANCE_ID%
|
|
if errorlevel 1 exit /b 1
|
|
>evidence\last-stopped.txt echo %TARGET_INSTANCE_ID%
|
|
exit /b 0
|