Skip to content

Commit

Permalink
fix: Changed deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gyehyun-bak committed Oct 24, 2024
1 parent a256c03 commit 2249903
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
key: ${{ secrets.EC2_PRIVATE_KEY }}
script_stop: true
script: |
docker-compose down || true # 기존 컨테이너 중지 및 제거
docker-compose pull # ECR에서 최신 이미지를 가져오기
docker-compose up -d # 새로운 컨테이너 실행
docker stop cano-server || true
docker rm cano-server || true
docker pull ${{ steps.login-ecr.outputs.registry }}/cano-server:latest
docker run -d --name cano-server --network cano-network -p 8080:8080 ${{ steps.login-ecr.outputs.registry }}/cano-server:latest

0 comments on commit 2249903

Please sign in to comment.