Skip to content

Commit

Permalink
feat: blue green 무중단 배포 스크립트
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee committed Oct 15, 2024
1 parent cfceb50 commit 6192b42
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,25 @@ jobs:
echo "Nginx container started."
fi
# Ensure nginx-conf directory exists
if [ ! -d ./nginx-conf ]; then
echo "Creating nginx-conf directory..."
mkdir -p ./nginx-conf
fi
# Ensure default.conf file exists
if [ ! -f ./nginx-conf/default.conf ]; then
echo "Creating default.conf file..."
echo "
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:${{ steps.check-port.outputs.next_port }};
}
}
" > ./nginx-conf/default.conf
fi
# Update Nginx configuration file on host
echo "Updating Nginx configuration file on host..."
sudo sed -i "s/proxy_pass http:\/\/127.0.0.1:.*;/proxy_pass http:\/\/127.0.0.1:${{ steps.check-port.outputs.next_port }};/" ./nginx-conf/default.conf
Expand Down

0 comments on commit 6192b42

Please sign in to comment.