Skip to content

Commit

Permalink
fix: 무중단 배포 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kalsteve committed Jul 23, 2024
1 parent 9fcfb0f commit 9d59a94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ init_container() {

# 컨테이너 스위칭 함수
switch_container() {
local IS_BLUE=$(docker compose -p "${DOCKER_APP_NAME}" -f ${PROJECT_ROOT}/docker-compose-deploy.yml ps | grep fastapi-blue)
local IS_BLUE=$(docker compose -p ${DOCKER_APP_NAME} -f ${PROJECT_ROOT}/docker-compose-deploy.yml ps | grep fastapi-blue)
# IS_BLUE 변수에 fastapi-blue가 없다면
if [ -z "$IS_BLUE" ]; then
log_message "### GREEN => BLUE ###"
Expand All @@ -55,7 +55,7 @@ switch_container() {

sleep 30

health_check "http://127.0.0.1:8000/healthcheck"
health_check "http://127.0.0.1:8001/healthcheck"
else
log_message "### BLUE => GREEN ###"
execute_and_log "docker compose -p ${DOCKER_APP_NAME} -f ${PROJECT_ROOT}/docker-compose-deploy.yml up -d --build fastapi-green"
Expand Down

0 comments on commit 9d59a94

Please sign in to comment.