From 22499035c96a5d663e5aac6e0cc64707a545a176 Mon Sep 17 00:00:00 2001 From: Gyehyun Park Date: Fri, 25 Oct 2024 01:12:35 +0900 Subject: [PATCH] fix: Changed deploy.yml --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a057b97..a865ed5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 # 새로운 컨테이너 실행 \ No newline at end of file + 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 \ No newline at end of file