diff --git a/scripts/batch/deploy.sh b/scripts/batch/deploy.sh index 1b40cfe..0949cee 100644 --- a/scripts/batch/deploy.sh +++ b/scripts/batch/deploy.sh @@ -11,7 +11,7 @@ RUNNING_CONTAINER_NAME=$(echo "$DOCKER_PS_OUTPUT" | awk '{print $NF}') IS_REDIS_ACTIVATE=$(docker ps | grep redis) IS_GREEN_ACTIVATE=$(docker ps | grep green-batch) -WEB_HEALTH_CHECK_URL=/actuator/health +WEB_HEALTH_CHECK_URL=/api/health # Redis Docker Image Pull if [ -z "$IS_REDIS_ACTIVATE" ];then @@ -65,10 +65,10 @@ if [ -z $IS_GREEN_ACTIVATE ]; then sleep 3 RESPONSE=$(curl -s http://localhost:${CURRENT_SERVER_PORT}${WEB_HEALTH_CHECK_URL}) - UP_COUNT=$(echo $RESPONSE | grep 'UP' | wc -l) + UP_COUNT=$(echo $RESPONSE | grep 'success' | wc -l) echo "[$NOW_TIME] Health check 응답: ${RESPONSE}" - if [ $UP_COUNT -ge 1 ]; then # "UP" 문자열이 1개 이상 존재한다면 헬스체크 통과 + if [ $UP_COUNT -ge 1 ]; then # "success" 문자열이 1개 이상 존재한다면 헬스체크 통과 echo "[$NOW_TIME] Health check 성공!" break; else @@ -112,10 +112,10 @@ else sleep 3 RESPONSE=$(curl -s http://localhost:${CURRENT_SERVER_PORT}${WEB_HEALTH_CHECK_URL}) - UP_COUNT=$(echo $RESPONSE | grep 'UP' | wc -l) + UP_COUNT=$(echo $RESPONSE | grep 'success' | wc -l) echo "[$NOW_TIME] Health check 응답: ${RESPONSE}" - if [ $UP_COUNT -ge 1 ]; then # "UP" 문자열이 1개 이상 존재한다면 헬스체크 통과 + if [ $UP_COUNT -ge 1 ]; then # "success" 문자열이 1개 이상 존재한다면 헬스체크 통과 echo "[$NOW_TIME] Health check 성공!" break; else @@ -144,7 +144,7 @@ echo "----------------------------------------------------------------------" # Nginx를 통해서 서버에 접근 가능한지 확인 RESPONSE=$(curl -s http://localhost:${CURRENT_SERVER_PORT}${WEB_HEALTH_CHECK_URL}) -UP_COUNT=$(echo $RESPONSE | grep 'UP' | wc -l) +UP_COUNT=$(echo $RESPONSE | grep 'success' | wc -l) echo "[$NOW_TIME] Health check 응답: ${RESPONSE}" if [ $UP_COUNT -ge 1 ]