Skip to content

Commit

Permalink
Update deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dong2ast committed Jul 10, 2023
1 parent bd1bcec commit 714d320
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DEPLOY_PATH=/home/ubuntu/app/nonstop/jar/
cp $BUILD_PATH $DEPLOY_PATH

echo "> 현재 구동중인 Set 확인"
CURRENT_PROFILE=$(curl -L http://localhost/profile)
CURRENT_PROFILE=$(curl -sL http://localhost/profile)
echo "> $CURRENT_PROFILE"

# 쉬고 있는 set 찾기: set1이 사용중이면 set2가 쉬고 있고, 반대면 set1이 쉬고 있음
Expand Down Expand Up @@ -49,12 +49,12 @@ echo "> $IDLE_PROFILE 배포"
nohup java -jar -Duser.timezone=Asia/Seoul -Dspring.profiles.active=$IDLE_PROFILE $IDLE_APPLICATION_PATH >> /home/ubuntu/app/nohup.out 2>&1 &

echo "> $IDLE_PROFILE 10초 후 Health check 시작"
echo "> curl -L http://localhost:$IDLE_PORT/health "
echo "> curl -sL http://localhost:$IDLE_PORT/health "
sleep 10

for retry_count in {1..10}
do
response=$(curl -L http://localhost:$IDLE_PORT/actuator/health)
response=$(curl -sL http://localhost:$IDLE_PORT/actuator/health)
up_count=$(echo $response | grep 'UP' | wc -l)

if [ $up_count -ge 1 ]
Expand Down

0 comments on commit 714d320

Please sign in to comment.