CodeDeploy 스크립트 추가
This commit is contained in:
12
scripts/run_process.sh
Normal file
12
scripts/run_process.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
BUILD_JAR=$(ls /home/ec2-user/build/libs/*.jar) # jar가 위치하는 곳
|
||||
JAR_NAME=$(basename $BUILD_JAR)
|
||||
|
||||
echo "> build 파일 복사" >> /home/ec2-user/deploy.log
|
||||
DEPLOY_PATH=/home/ec2-user/
|
||||
cp $BUILD_JAR $DEPLOY_PATH
|
||||
|
||||
DEPLOY_JAR=$DEPLOY_PATH$JAR_NAME
|
||||
echo "> DEPLOY_JAR 배포" >> /home/ec2-user/deploy.log
|
||||
chmod +x $DEPLOY_JAR
|
||||
nohup java -jar $DEPLOY_JAR >> /home/ec2-user/deploy.log 2> /dev/null < /dev/null &
|
Reference in New Issue
Block a user