forked from mtusi2026/mtusi2026lab4
11 lines
338 B
Batchfile
11 lines
338 B
Batchfile
@echo off
|
|
REM Windows equivalent of scripts/stop-one.sh for the local failover hook.
|
|
cd /d "%~dp0.."
|
|
if "%TARGET_INSTANCE_ID%"=="api1" goto stop
|
|
if "%TARGET_INSTANCE_ID%"=="api2" goto stop
|
|
echo unknown target instance: %TARGET_INSTANCE_ID% >&2
|
|
exit /b 1
|
|
:stop
|
|
docker compose --env-file .env stop %TARGET_INSTANCE_ID%
|
|
exit /b %ERRORLEVEL%
|