Skip to content

Commit

Permalink
Merge pull request #23 from Kusitms-29th-Kobaco-A/chore/blue-green
Browse files Browse the repository at this point in the history
chore : deploy.sh 일부 수정
  • Loading branch information
tlarbals824 authored Feb 29, 2024
2 parents d338164 + 58cf442 commit ff36f2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .deploy/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /bin/sh

current_application_port=$(expr $application_port)

echo ${current_application_port}
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit ff36f2b

Please sign in to comment.