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 1df2e61 commit 5da9a0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
run: |
echo "Checking if any container is running on ports 8080 or 8081..."
CURRENT_PORT=$(sudo docker ps --format "{{.Names}} {{.Ports}}" | grep "***-backend" | grep -o '8080\|8081' || echo "")
echo "CURRENT_PORT on port $CURRENT_PORT."
# CURRENT_PORT가 빈 문자열이거나 8081인 경우
if [ -z "$CURRENT_PORT" ] || [ "$CURRENT_PORT" == "8081" ]; then
echo "null or 8081"
NEXT_PORT=8080
else
echo "8080"
NEXT_PORT=8081
fi
echo "Next container will run on port $NEXT_PORT."
echo "Next container will run on port $NEXT_PORT."
echo "::set-output name=next_port::$NEXT_PORT"
Expand Down

0 comments on commit 5da9a0f

Please sign in to comment.