Skip to content

Commit

Permalink
chore: deploy.sh 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Oct 7, 2023
1 parent 758c290 commit 1f8b7bd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 83 deletions.
15 changes: 0 additions & 15 deletions .idea/compiler.xml

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/gradle.xml

This file was deleted.

20 changes: 0 additions & 20 deletions .idea/jarRepositories.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

30 changes: 12 additions & 18 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ if [ -z $IS_GREEN_EXIST ]; then
docker-compose pull green
echo ">>> green container를 up합니다."
docker-compose up -d green
while [ 1 = 1 ]; do
echo ">>> green health check 중..."
sleep 3
REQUEST=$(curl http://127.0.0.1:8082)
if [ -n "$REQUEST" ]; then
echo ">>> 🍃 health check success !"
break;
fi
done
echo ">>> green health check 중..."
sleep 3
GREEN_HEALTH=$(docker ps | grep green)
if [ -n "$GREEN_HEALTH" ]; then
echo ">>> 🍃 health check success !"
fi
sleep 3
echo ">>> nginx를 다시 실행 합니다."
sudo cp /etc/nginx/nginx.green.conf /etc/nginx/nginx.conf
Expand All @@ -33,15 +30,12 @@ else
docker-compose pull blue
echo ">>> blue container up합니다."
docker-compose up -d blue
while [ 1 = 1 ]; do
echo ">>> blue health check 중..."
sleep 3
REQUEST=$(curl http://127.0.0.1:8081)
if [ -n "$REQUEST" ]; then
echo ">>> 🍃 health check success !"
break;
fi
done
echo ">>> blue health check 중..."
sleep 3
BLUE_HEALTH=$(docker ps | grep blue)
if [ -n "$BLUE_HEALTH" ]; then
echo ">>> 🍃 health check success !"
fi
sleep 3
echo ">>> nginx를 다시 실행 합니다."
sudo cp /etc/nginx/nginx.blue.conf /etc/nginx/nginx.conf
Expand Down

0 comments on commit 1f8b7bd

Please sign in to comment.