Skip to content

Commit

Permalink
fix: 운영 실행 설정 변경 (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
dskym authored Aug 25, 2022
1 parent 87f84d6 commit 940aa2a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .ebextensions-real/00-makeFiles.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
files:
"/sbin/appstart" :
"/sbin/api_start" :
mode: "000755"
owner: webapp
group: webapp
content: |
# run app
nohup java -Duser.timezone="Asia/Seoul" -Dspring.profiles.active=real -jar /var/app/current/fairer-api.jar &
nohup java -Duser.timezone="Asia/Seoul" -Dspring.profiles.active=real -jar /var/app/current/fairer-batch.jar &
kill `ps -ef | grep fairer-api | awk '{print $2}'`
java -Duser.timezone="Asia/Seoul" -Dspring.profiles.active=real -jar /var/app/current/fairer-api.jar
"/sbin/batch_start" :
mode: "000755"
owner: webapp
group: webapp
content: |
# run app
kill `ps -ef | grep fairer-batch | awk '{print $2}'`
java -Duser.timezone="Asia/Seoul" -Dspring.profiles.active=real -jar /var/app/current/fairer-batch.jar
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: appstart
api: api_start
batch: batch_start
4 changes: 4 additions & 0 deletions fairer-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ spring:
profiles:
active: "local"

logging:
file:
name: spring-api.log

---

spring:
Expand Down
2 changes: 1 addition & 1 deletion fairer-api/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/spring.log</file>
<file>logs/spring-api.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_PATH_NAME}/%d{yyyy-MM-dd}.%i.log</fileNamePattern>
Expand Down
2 changes: 2 additions & 0 deletions fairer-batch/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spring:
logging:
level:
root: info
file:
name: spring-batch.log

# spring actuator endpoints 기본으로 disable 적용
management:
Expand Down
2 changes: 1 addition & 1 deletion fairer-batch/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/spring.log</file>
<file>logs/spring-batch.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_PATH_NAME}/%d{yyyy-MM-dd}.%i.log</fileNamePattern>
Expand Down

0 comments on commit 940aa2a

Please sign in to comment.