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 442cd74 commit 5c9d7e0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,20 @@ jobs:
done
echo # 줄바꿈
- name: Health check the new container
run: |
echo "Performing health check for the new container on port $NEXT_PORT..."
HEALTH_STATUS=$(curl -s http://localhost:$NEXT_PORT/actuator/health | sed -n 's/.*"status":"\([^"]*\)".*/\1/p')
echo "Health check status: $HEALTH_STATUS"
if [ "$HEALTH_STATUS" != "UP" ]; then
echo "Health check failed. Rolling back..."
sudo docker rm -f haengdong-backend-$NEXT_PORT
exit 1
fi
echo "Health check passed."
# - name: Health check the new container
# run: |
# echo "Performing health check for the new container on port $NEXT_PORT..."
# HEALTH_STATUS=$(curl -s http://localhost:$NEXT_PORT/actuator/health | sed -n 's/.*"status":"\([^"]*\)".*/\1/p')
#
# echo "Health check status: $HEALTH_STATUS"
#
# if [ "$HEALTH_STATUS" != "UP" ]; then
# echo "Health check failed. Rolling back..."
# sudo docker rm -f haengdong-backend-$NEXT_PORT
# exit 1
# fi
#
# echo "Health check passed."

- name: Update or create Nginx container to point to new container port
run: |
Expand Down

0 comments on commit 5c9d7e0

Please sign in to comment.