Skip to content

Commit

Permalink
chore: deploy.sh 내용 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
shindong96 committed Apr 8, 2024
1 parent 813afe7 commit 57258c9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -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 &

0 comments on commit 57258c9

Please sign in to comment.