From 684ee1e5ebfc757c859e2263dc6c4f91cd6431f4 Mon Sep 17 00:00:00 2001 From: Junho Hwang <72647031+juno-junho@users.noreply.github.com> Date: Mon, 20 May 2024 22:31:11 -0700 Subject: [PATCH] =?UTF-8?q?=EA=B8=88=EC=B9=99=EC=96=B4=20=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=EB=B0=B0=ED=8F=AC=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy-blue-green.sh | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/scripts/deploy-blue-green.sh b/scripts/deploy-blue-green.sh index 838febd6..09eb5c81 100644 --- a/scripts/deploy-blue-green.sh +++ b/scripts/deploy-blue-green.sh @@ -9,11 +9,11 @@ JAR_NAME=$(ls -tr $PACKAGE | grep 'SNAPSHOT.jar' | tail -n 1) # snapshot jar 파 JAR_PATH=$PACKAGE$JAR_NAME # action/build/libs/*SNAPSHOT.jar echo "> build 파일명: $JAR_NAME" -# 금칙어 리스트 복사 (최신화) -PROFANITY_LIST_LOCATION_TO_STORE=$REPOSITORY/bad_word_list.txt -PROFANITY_LIST_LOCATION=$REPOSITORY/action/src/main/resources/secrets/bad_word_list.txt -echo "> 금칙어 list 복사" # 덮어 쓰기 -cp -f $PROFANITY_LIST_LOCATION $PROFANITY_LIST_LOCATION_TO_STORE +# 금칙어 리스트 복사 (최신화) - DB 이전에 따른 삭제 +#PROFANITY_LIST_LOCATION_TO_STORE=$REPOSITORY/bad_word_list.txt +#PROFANITY_LIST_LOCATION=$REPOSITORY/action/src/main/resources/secrets/bad_word_list.txt +#echo "> 금칙어 list 복사" # 덮어 쓰기 +#cp -f $PROFANITY_LIST_LOCATION $PROFANITY_LIST_LOCATION_TO_STORE echo "> build 파일 복사" # 덮어 쓰기 DEPLOY_PATH=$REPOSITORY/jar/ @@ -47,17 +47,6 @@ IDLE_APPLICATION_PATH=$DEPLOY_PATH$IDLE_APPLICATION echo "> jar 파일과 blue/green-SpaceClub.jar와 심볼릭 링크 생성" ln -Tfs $DEPLOY_PATH$JAR_NAME $IDLE_APPLICATION_PATH -echo "> $IDLE_PROFILE 에서 구동중인 애플리케이션 pid 확인" -IDLE_PID=$(pgrep -f $IDLE_APPLICATION) -if [ -z $IDLE_PID ] -then - echo "> 현재 구동중인 애플리케이션이 없으므로 종료하지 않습니다." -else - echo "> kill -15 $IDLE_PID" - sudo kill -15 $IDLE_PID - sleep 5 -fi - echo "> $IDLE_PROFILE 배포" sudo nohup java -jar $IDLE_APPLICATION_PATH --spring.profiles.active=develop,$IDLE_PROFILE --jasypt.encryptor.password=${encrypt} --bad-word.path=$PROFANITY_LIST_LOCATION_TO_STORE > /home/ubuntu/log/nohup_log.out 2> /home/ubuntu/log/nohup_error.out &