From 58cf44261a81eaf91720580fe773581ad00353a8 Mon Sep 17 00:00:00 2001 From: tlarbals824 Date: Thu, 29 Feb 2024 16:11:23 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20deploy.sh=20=EC=9D=BC=EB=B6=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .deploy/deploy.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.deploy/deploy.sh b/.deploy/deploy.sh index d1d8d3b..e20559b 100644 --- a/.deploy/deploy.sh +++ b/.deploy/deploy.sh @@ -1,3 +1,5 @@ +#! /bin/sh + current_application_port=$(expr $application_port) echo ${current_application_port} @@ -35,9 +37,10 @@ for i in {1..10}; do if [ "$cmd" -eq 202 ]; then application_status="SUCCESS" + echo ${application_status} break; else - echo "fail" + echo "FAIL" sleep 10 fi done @@ -47,7 +50,7 @@ if [ "$application_staus" == "FAIL" ]; then $(docker rm -f $green_application_name) else echo "reload processing" - echo "set "'$service_port'" ${green_application_port}" | sudo tee /home/ubuntu/nginx/conf/service-port.inc + echo $(docker image prune -f) export application_port=${green_application_port} echo $(docker rename $blue_application_name $temp_application_name) echo $(docker rename $green_application_name $blue_application_name)