From e371508e3877e960866c724f74319104cc4e9639 Mon Sep 17 00:00:00 2001 From: j-yong99 Date: Sun, 7 Apr 2024 11:34:09 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20CI/CD=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/moment/moment-server/deploy.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/backend/moment/moment-server/deploy.sh b/backend/moment/moment-server/deploy.sh index 0faafe4f7c..7c744ad267 100644 --- a/backend/moment/moment-server/deploy.sh +++ b/backend/moment/moment-server/deploy.sh @@ -1,15 +1,5 @@ ssh -tt -p ${SERVER_PORT} ${SERVER_USER}@${SERVER_HOST} -i key.txt -o StrictHostKeyChecking=no << 'ENDSSH' cd capstone-2024-22/backend/moment/moment-server -# Check if the container is already running -if [ "$(docker ps -q -f name=moment-server)" ]; then - # If the container is running, stop and remove it - docker stop moment-server - docker rm moment-server -fi - -# Pull the latest changes from the repository -git pull origin "deploy/v1" - -# Build and start the container +docker-compose down docker-compose up --build -d ENDSSH \ No newline at end of file