-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Release 0.1.0 | ||
- 릴리즈 노트 최초 생성. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
REPOSITORY=/home/ec2-user/apps | ||
PROJECT_NAME=trackdayb | ||
|
||
cd $REPOSITORY/$PROJECT_NAME/ | ||
|
||
echo "> Git reset --hard" | ||
git reset --hard | ||
|
||
echo "> Git Pull" | ||
|
||
git pull | ||
|
||
echo "Release Version Updated" | ||
grep "^Release" ./releasenote.txt | tail -1 > ./src/main/frontend/public/latestReleaseVer.txt | ||
|
||
|
||
echo "> gradlew, deploy.sh 권한 변경 " | ||
chmod 777 gradlew | ||
chmod 774 scripts/deploy.sh | ||
|
||
echo "> 프로젝트 Build 시작" | ||
./gradlew build | ||
|
||
echo "> Build 파일 복사" | ||
|
||
cp ./build/libs/*.jar $REPOSITORY/ | ||
|
||
echo "> 현재 구동중인 애플리케이션 pid 확인" | ||
|
||
CURRENT_PID=$(pgrep -f ${PROJECT_NAME}.*.jar) | ||
|
||
echo "$CURRENT_PID" | ||
|
||
if [ -z "$CURRENT_PID" ]; then | ||
echo "> 현재 구동중인 애플리케이션이 없으므로 종료하지 않습니다." | ||
else | ||
echo "> kill -2 $CURRENT_PID" | ||
sudo kill -9 "$CURRENT_PID" | ||
sleep 5 | ||
fi | ||
|
||
echo "> 새 어플리케이션 배포" | ||
|
||
# JAR_NAME=$(ls $REPOSITORY/ |grep jar | tail -n 1) | ||
JAR_NAME=$(ls $REPOSITORY/ |grep ${PROJECT_NAME}.*.jar | tail -n 1) | ||
|
||
echo "> JAR Name: $JAR_NAME" | ||
|
||
nohup java -jar $REPOSITORY/"$JAR_NAME" & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
|
||
<!--로그 파일 저장 위치--> | ||
<property name="LOGS_PATH" value="./logs"/> | ||
|
||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<Pattern>%d{HH:mm} %highlight(%-5level) %cyan(%logger{36}) - %msg%n</Pattern> | ||
</layout> | ||
</appender> | ||
<appender name="DAILY_ROLLING_FILE_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${LOGS_PATH}/logback.log</file> | ||
<encoder> | ||
<pattern>[%d{yyyy-MM-dd HH:mm:ss}:%-3relative][%thread] %-5level %logger{35} - %msg%n</pattern> | ||
</encoder> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- <fileNamePattern>${LOGS_PATH}/logback.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> --> | ||
<fileNamePattern>${LOGS_PATH}/logback.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||
<!-- or whenever the file size reaches 100MB --> | ||
<maxFileSize>5MB</maxFileSize> | ||
<!-- kb, mb, gb --> | ||
</timeBasedFileNamingAndTriggeringPolicy> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
</appender> | ||
|
||
<logger name="com.bside.bside_311" level="DEBUG"> | ||
<appender-ref ref="DAILY_ROLLING_FILE_APPENDER"/> | ||
<appender-ref ref="STDOUT"/> | ||
</logger> | ||
<root level="INFO"> | ||
<appender-ref ref="DAILY_ROLLING_FILE_APPENDER"/> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
|
||
<logger name="jdbc" level="OFF"/> | ||
<logger name="jdbc.sqlonly" level="OFF"/> | ||
<logger name="jdbc.sqltiming" level="DEBUG"/> | ||
<logger name="jdbc.audit" level="OFF"/> | ||
<logger name="jdbc.resultset" level="OFF"/> | ||
<logger name="jdbc.resultsettable" level="DEBUG"/> | ||
<logger name="jdbc.connection" level="OFF"/> | ||
|
||
</configuration> |