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 1095bc6 commit d53565f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ jobs:
# Create or update the default.conf file with the new configuration
echo "Creating or updating default.conf..."
cat > ./nginx-conf/default.conf <<EOF
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:${{ steps.check-port.outputs.next_port }};
}
}
EOF
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:${{ steps.check-port.outputs.next_port }};
}
}
EOF

# Test Nginx configuration inside a temporary container
echo "Testing Nginx configuration..."
Expand All @@ -171,13 +171,13 @@ jobs:
# Create the default.conf file with the initial configuration
echo "Creating default.conf..."
cat > ./nginx-conf/default.conf <<EOF
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:${{ steps.check-port.outputs.next_port }};
}
}
EOF
server {
listen 80;
location / {
proxy_pass http://127.0.0.1:${{ steps.check-port.outputs.next_port }};
}
}
EOF

# Test Nginx configuration inside a temporary container
echo "Testing Nginx configuration..."
Expand All @@ -197,6 +197,7 @@ jobs:
echo "New Nginx container created and running."
fi


- name: Stop and remove the old container
run: |
CURRENT_PORT=${{ steps.check-port.outputs.current_port }}
Expand Down

0 comments on commit d53565f

Please sign in to comment.