From e772f9f834a5a7fec65ab4f58bd45fdda0b66986 Mon Sep 17 00:00:00 2001 From: Piergiorgio Lucidi Date: Thu, 13 Apr 2023 12:48:07 +0200 Subject: [PATCH] Updated the run.bat script adding commands (#5) --- run.bat | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/run.bat b/run.bat index eeebc95..f8b2812 100644 --- a/run.bat +++ b/run.bat @@ -1,10 +1,19 @@ @ECHO OFF IF [%1]==[] ( - echo "Usage: %0 {start|stop|purge|tail}" + echo "Usage: %0 {build_start | build | start | stop | purge | tail}" GOTO END ) +IF %1==build ( + CALL :build + GOTO END +) +IF %1==build_start ( + CALL :build_start + CALL :tail + GOTO END +) IF %1==start ( CALL :start CALL :tail @@ -24,17 +33,27 @@ IF %1==tail ( GOTO END ) -echo "Usage: %0 {start|stop|purge|tail}" +echo "Usage: %0 {build_start | build | start | stop | purge | tail}" :END EXIT /B %ERRORLEVEL% -:start +:build + docker-compose build +EXIT /B 0 +:build_start docker volume create aps-db-sa-volume docker volume create aps-admin-db-sa-volume docker volume create aps-contentstore-sa-volume docker volume create aps-es-sa-volume docker-compose up --build -d EXIT /B 0 +:start + docker volume create aps-db-sa-volume + docker volume create aps-admin-db-sa-volume + docker volume create aps-contentstore-sa-volume + docker volume create aps-es-sa-volume + docker-compose up -d +EXIT /B 0 :down docker-compose -f "%COMPOSE_FILE_PATH%" down EXIT /B 0 @@ -49,4 +68,4 @@ EXIT /B 0 docker volume rm aps-admin-db-sa-volume docker volume rm aps-contentstore-sa-volume docker volume rm aps-es-sa-volume -EXIT /B 0 \ No newline at end of file +EXIT /B 0