Skip to content

Commit

Permalink
chore: docker-compse 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
clean2001 committed Oct 30, 2024
1 parent 3417666 commit f88dfc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layer-api/infra/production/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

IS_GREEN=$(sudo docker ps | grep green) # 현재 실행중인 App이 blue인지 확인합니다.
IS_GREEN=$(sudo docker ps | grep layer-api-blue) # 현재 실행중인 App이 blue인지 확인합니다.
DEFAULT_CONF=" /etc/nginx/nginx.conf"

if [ -z $IS_GREEN ];then # blue라면
Expand All @@ -16,7 +16,7 @@ if [ -z $IS_GREEN ];then # blue라면
echo "3. green health check..."
sudo sleep 3

REQUEST=$(sudo curl http://127.0.0.1:8080) # green으로 request
REQUEST=$(sudo curl http://127.0.0.1:8080/greeting) # green으로 request
if [ -n "$REQUEST" ]; then # 서비스 가능하면 health check 중지
echo "health check success"
break ;
Expand All @@ -41,7 +41,7 @@ else
while [ 1 = 1 ]; do
echo "3. blue health check..."
sleep 3
REQUEST=$(curl http://127.0.0.1:8081) # blue로 request
REQUEST=$(curl http://127.0.0.1:8081/greeting) # blue로 request

if [ -n "$REQUEST" ]; then # 서비스 가능하면 health check 중지
echo "health check success"
Expand Down

0 comments on commit f88dfc6

Please sign in to comment.