From 940aa2a7e6386e7b3fb1fe213c2fef2f029a02fe Mon Sep 17 00:00:00 2001 From: SeungYoon Kim Date: Thu, 25 Aug 2022 20:37:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9A=B4=EC=98=81=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD=20(#139)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ebextensions-real/00-makeFiles.config | 14 +++++++++++--- Procfile | 3 ++- fairer-api/src/main/resources/application.yml | 4 ++++ fairer-api/src/main/resources/logback-spring.xml | 2 +- fairer-batch/src/main/resources/application.yml | 2 ++ fairer-batch/src/main/resources/logback-spring.xml | 2 +- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.ebextensions-real/00-makeFiles.config b/.ebextensions-real/00-makeFiles.config index a823db86..a54d1b59 100644 --- a/.ebextensions-real/00-makeFiles.config +++ b/.ebextensions-real/00-makeFiles.config @@ -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 & \ No newline at end of file + 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 \ No newline at end of file diff --git a/Procfile b/Procfile index 58dab8d4..ae9b293b 100644 --- a/Procfile +++ b/Procfile @@ -1 +1,2 @@ -web: appstart \ No newline at end of file +api: api_start +batch: batch_start \ No newline at end of file diff --git a/fairer-api/src/main/resources/application.yml b/fairer-api/src/main/resources/application.yml index b443f8b0..91a96326 100644 --- a/fairer-api/src/main/resources/application.yml +++ b/fairer-api/src/main/resources/application.yml @@ -2,6 +2,10 @@ spring: profiles: active: "local" +logging: + file: + name: spring-api.log + --- spring: diff --git a/fairer-api/src/main/resources/logback-spring.xml b/fairer-api/src/main/resources/logback-spring.xml index 704d2aa3..3646f5fc 100644 --- a/fairer-api/src/main/resources/logback-spring.xml +++ b/fairer-api/src/main/resources/logback-spring.xml @@ -10,7 +10,7 @@ - logs/spring.log + logs/spring-api.log ${LOG_PATH_NAME}/%d{yyyy-MM-dd}.%i.log diff --git a/fairer-batch/src/main/resources/application.yml b/fairer-batch/src/main/resources/application.yml index e7a155d6..281f76ea 100644 --- a/fairer-batch/src/main/resources/application.yml +++ b/fairer-batch/src/main/resources/application.yml @@ -15,6 +15,8 @@ spring: logging: level: root: info + file: + name: spring-batch.log # spring actuator endpoints 기본으로 disable 적용 management: diff --git a/fairer-batch/src/main/resources/logback-spring.xml b/fairer-batch/src/main/resources/logback-spring.xml index 704d2aa3..c3cb3c15 100644 --- a/fairer-batch/src/main/resources/logback-spring.xml +++ b/fairer-batch/src/main/resources/logback-spring.xml @@ -10,7 +10,7 @@ - logs/spring.log + logs/spring-batch.log ${LOG_PATH_NAME}/%d{yyyy-MM-dd}.%i.log