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 e05fb05 commit 2279046
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,11 @@ jobs:
run: |
CURRENT_PORT=${{ steps.check-port.outputs.current_port }}
if [ -n "$CURRENT_PORT" ]; then
echo "Stopping and removing the container running on port $CURRENT_PORT..."
echo "Stopping on port $CURRENT_PORT..."
sudo docker ps --filter "publish=$CURRENT_PORT" --format "{{.ID}}" | xargs sudo docker stop
sleep 5
echo "Sleeping on port $CURRENT_PORT..."
sleep 15
echo "Removing on port $CURRENT_PORT..."
sudo docker ps -a --filter "publish=$CURRENT_PORT" --format "{{.ID}}" | xargs sudo docker rm
else
echo "No container to stop and remove."
Expand Down

0 comments on commit 2279046

Please sign in to comment.