Skip to content

Commit

Permalink
Refactor(#14):컨테이너 실행 후 10초동안 대기하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkyun0713 authored Jul 18, 2024
1 parent 72cd160 commit b223417
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ jobs:
if [ $(sudo docker ps -q -f name=${{ env.CONTAINER_NAME_BLUE }}) ]; then
sudo docker pull ${{ env.DOCKER_IMAGE_NAME }}
sudo docker run --name ${{ env.CONTAINER_NAME_GREEN }} -d -p ${{ env.GREEN_PORT }}:${{ env.GREEN_PORT }} -e TZ=Asia/Seoul ${{ env.DOCKER_IMAGE_NAME }}
sleep 10
sudo docker stop ${{ env.CONTAINER_NAME_BLUE }}
sudo docker rm ${{ env.CONTAINER_NAME_BLUE }}
else
sudo docker pull ${{ env.DOCKER_IMAGE_NAME }}
sudo docker run --name ${{ env.CONTAINER_NAME_BLUE }} -d -p ${{ env.BLUE_PORT }}:${{ env.BLUE_PORT }} -e TZ=Asia/Seoul ${{ env.DOCKER_IMAGE_NAME }}
sleep 10
sudo docker stop ${{ env.CONTAINER_NAME_GREEN }}
sudo docker rm ${{ env.CONTAINER_NAME_GREEN }}
fi

0 comments on commit b223417

Please sign in to comment.