Skip to content

Commit

Permalink
๐Ÿ“ docs: deploy.sh ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
jun02160 committed Mar 2, 2024
1 parent 82ccd1e commit 84effcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions scripts/api/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ if [ -z $IS_GREEN_ACTIVATE ]; then
echo "[$NOW_TIME] Health check์˜ ์‘๋‹ต์„ ์•Œ ์ˆ˜ ์—†๊ฑฐ๋‚˜ status๊ฐ€ UP์ด ์•„๋‹™๋‹ˆ๋‹ค."
fi

if [ $retry_count -eq 10 ]; then
if [ $retry_count -eq 15 ]; then
echo "[$NOW_TIME] Health check ์‹คํŒจ.."
echo "[$NOW_TIME] Nginx์— ์—ฐ๊ฒฐํ•˜์ง€ ์•Š๊ณ  ๋ฐฐํฌ๋ฅผ ์ข…๋ฃŒํ•ฉ๋‹ˆ๋‹ค."
docker-compose stop green-api
exit 1
fi
done;
Expand Down Expand Up @@ -122,9 +123,10 @@ else
echo "[$NOW_TIME] Health check์˜ ์‘๋‹ต์„ ์•Œ ์ˆ˜ ์—†๊ฑฐ๋‚˜ status๊ฐ€ UP์ด ์•„๋‹™๋‹ˆ๋‹ค."
fi

if [ $retry_count -eq 10 ]; then
if [ $retry_count -eq 15 ]; then
echo "[$NOW_TIME] Health check ์‹คํŒจ.."
echo "[$NOW_TIME] Nginx์— ์—ฐ๊ฒฐํ•˜์ง€ ์•Š๊ณ  ๋ฐฐํฌ๋ฅผ ์ข…๋ฃŒํ•ฉ๋‹ˆ๋‹ค."
docker-compose stop blue-api
exit 1
fi
done;
Expand Down
4 changes: 2 additions & 2 deletions scripts/batch/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ fi
echo "----------------------------------------------------------------------"

# Nginx๋ฅผ ํ†ตํ•ด์„œ ์„œ๋ฒ„์— ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ์ง€ ํ™•์ธ
RESPONSE=$(curl -s http://localhost:${CURRENT_SERVER_PORT}${WEB_HEALTH_CHECK_URL})
UP_COUNT=$(echo $RESPONSE | grep 'success' | wc -l)
RESPONSE=$(sudo lsof -i :${CURRENT_SERVER_PORT})
UP_COUNT=$(echo $RESPONSE | grep 'docker' | wc -l)
echo "[$NOW_TIME] Health check ์‘๋‹ต: ${RESPONSE}"

if [ $UP_COUNT -ge 1 ]
Expand Down

0 comments on commit 84effcb

Please sign in to comment.