/
iezhelev
/
cppsh_micro
Обзор
Документация
Войти
/
iezhelev
/
cppsh_micro
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
redeploy_serv.bat
24 строки
819 B
iezhelev
first commit
24 фев 2025, 13:52
24 фев 2025, 13:52
7ac2ca6
Код
Авторство
О чём код?
@echo off REM Check if the service name parameter is provided if "%1"=="" ( echo Error: Please provide the service name as a parameter. exit /b 1 ) REM Set the service name from the first parameter set SERVICE_NAME=%1 REM Step 1: Stop and remove existing containers for the specified service echo Stopping and removing existing containers for service: %SERVICE_NAME%... docker-compose down %SERVICE_NAME% REM Step 2: Build the Docker images for the specified service echo Building Docker images for service: %SERVICE_NAME%... docker-compose build %SERVICE_NAME% REM Step 3: Start the containers in detached mode for the specified service echo Starting containers in detached mode for service: %SERVICE_NAME%... docker-compose up -d %SERVICE_NAME% echo Automation complete for service: %SERVICE_NAME%! pause