From 57258c9c4bf7f5c8cf6bf27d0d48d46cf27bc7e6 Mon Sep 17 00:00:00 2001 From: shindong96 <2006peter@naver.com> Date: Mon, 8 Apr 2024 17:33:00 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20deploy.sh=20=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index e69de29b..eb2b41c0 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -0,0 +1,28 @@ +DEV_PORT=8080 +TEST_PORT=8081 + +DEV_PROFILE="dev" +TEST_PROFILE="test" + +JAR_FILE="bootstrap-0.0.1-SNAPSHOT.jar"성 +TEST_FOLDER="test" +DEV_LOG_FILE="gohigher.out" +TEST_LOG_FILE="gohigher-test.out" + +cd ~ +cd + +echo "> kill spring port" +fuser -k -n tcp ${DEV_PORT} +fuser -k -n tcp ${TEST_PORT} + +echo "> execute dev jar" +cd bootstrap/build/libs +nohup java -jar --spring.profiles.active=${DEV_PROFILE} ${JAR_FILE} 1>${DEV_LOG_FILE} 2>&1 & + +echo "> execute test jar" +mkdir ${TEST_FOLDER} +mv ${JAR_FILE} /${TEST_FOLDER} +cd test +nohup java -jar --spring.profiles.active=${TEST_PROFILE} --server.port=${TEST_PORT} ${JAR_FILE} 1>${TEST_LOG_FILE} 2>&1 & +