Skip to content

Commit 70e23db

Browse files
chore: 개발/운영 서버 타임존 설정, Tomcat 액세스 로그 활성화 (#62) (#63)
* chore: 개발/운영 서버 타임존을 서울(+09:00)로 로그 보기 편하려고 * chore: Tomcat 액세스 로그 활성화 요청/응답 현황 로깅 목적
1 parent 1be6409 commit 70e23db

4 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/deploy-to-dev-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
KAKAO_CLIENT_ID="${{ secrets.KAKAO_CLIENT_ID }}" \
7777
KAKAO_REDIRECT_URI="${{ secrets.KAKAO_REDIRECT_URI }}" \
7878
KAKAO_CLIENT_SECRET="${{ secrets.KAKAO_CLIENT_SECRET }}" \
79-
nohup java -jar $JAR_NAME --spring.profiles.active=dev > app.log 2>&1 &
79+
nohup java -Duser.timezone=Asia/Seoul -jar $JAR_NAME --spring.profiles.active=dev > app.log 2>&1 &
8080
8181
echo "✅ 배포 완료"
8282

.github/workflows/deploy-to-prod-ec2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
KAKAO_CLIENT_ID="${{ secrets.KAKAO_CLIENT_ID }}" \
7777
KAKAO_REDIRECT_URI="${{ secrets.KAKAO_REDIRECT_URI }}" \
7878
KAKAO_CLIENT_SECRET="${{ secrets.KAKAO_CLIENT_SECRET }}" \
79-
nohup java -jar $JAR_NAME --spring.profiles.active=prod > app.log 2>&1 &
79+
nohup java -Duser.timezone=Asia/Seoul -jar $JAR_NAME --spring.profiles.active=prod > app.log 2>&1 &
8080
8181
echo "✅ 배포 완료"
8282

src/main/resources/application-dev.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,26 @@ spring:
1111
jpa:
1212
hibernate:
1313
ddl-auto: validate
14+
show-sql: false
1415

1516
flyway:
1617
locations: classpath:db/migration
1718

1819
server:
1920
port: 8080
21+
tomcat:
22+
accesslog:
23+
enabled: true
24+
directory: /home/ubuntu/saerok/accesslogs
25+
prefix: access_log_
26+
suffix: .log
27+
rotate: true
28+
pattern: '%h %t "%m %U%q" %s %b %D'
29+
30+
logging:
31+
level:
32+
org.hibernate.SQL: off
33+
org.hibernate.type.descriptor.sql.BasicBinder: off
2034

2135
swagger:
2236
server-url: https://dev-api.saerok.app

src/main/resources/application-prod.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,26 @@ spring:
1111
jpa:
1212
hibernate:
1313
ddl-auto: validate
14+
show-sql: false
1415

1516
flyway:
1617
locations: classpath:db/migration
1718

1819
server:
1920
port: 8080
21+
tomcat:
22+
accesslog:
23+
enabled: true
24+
directory: /home/ubuntu/saerok/accesslogs
25+
prefix: access_log_
26+
suffix: .log
27+
rotate: true
28+
pattern: '%h %t "%m %U%q" %s %b %D'
29+
30+
logging:
31+
level:
32+
org.hibernate.SQL: off
33+
org.hibernate.type.descriptor.sql.BasicBinder: off
2034

2135
springdoc:
2236
swagger-ui:

0 commit comments

Comments
 (0)