forked from mtusi2026/mtusi2026lab7
ЛР 7: Безопасность, mTLS и OpenBao
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
setlocal
|
||||
if not defined TARGET_INSTANCE_ID exit /b 2
|
||||
set "PROJECT_DIR=%~dp0.."
|
||||
for /f "delims=" %%i in ('docker compose --project-directory "%PROJECT_DIR%" --env-file "%PROJECT_DIR%\.env" ps -q api') do (
|
||||
for /f "delims=" %%h in ('docker inspect --format "{{.Config.Hostname}}" %%i') do (
|
||||
if /i "%%h"=="%TARGET_INSTANCE_ID%" (
|
||||
docker stop %%i >nul
|
||||
exit /b 0
|
||||
)
|
||||
)
|
||||
)
|
||||
exit /b 1
|
||||
Reference in New Issue
Block a user