From 35345306d4f8d862b5895545c4a87d29bdb50044 Mon Sep 17 00:00:00 2001 From: tjrmswo <93309061+tjrmswo@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:34:17 +0900 Subject: [PATCH] =?UTF-8?q?ci=20cd=20=EC=A0=81=EC=9A=A9=20deploy.sh=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index ef3f2d3..2d8eb79 100644 --- a/deploy.sh +++ b/deploy.sh @@ -3,5 +3,16 @@ REPOSITORY=/home/ubuntu/deploy cd $REPOSITORY sudo pnpm install +# pm2의 전체 경로 설정 +PM2_BIN="/home/ubuntu/.nvm/versions/node/v20.15.1/bin/pm2" -sudo pm2 reload all \ No newline at end of file +# pm2가 실행 가능한지 확인 +if [ -x "$PM2_BIN" ]; then + # pm2를 사용하여 애플리케이션 시작 + $PM2_BIN start Frontend +else + echo "pm2를 찾거나 실행할 수 없습니다: $PM2_BIN" + exit 1 +fi + +# sudo $PM2_BIN reload all \ No newline at end of file