Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - 프로덕션 API v1.3.0 배포 #611

Merged
merged 6 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ dependencies {

// flyway 추가
implementation 'org.flywaydb:flyway-mysql'

// Prometheus
implementation 'io.micrometer:micrometer-registry-prometheus'

// Loki
implementation 'com.github.loki4j:loki-logback-appender:1.5.2'
}

tasks.named('test') {
Expand Down

This file was deleted.

This file was deleted.

24 changes: 12 additions & 12 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jasypt:
cloud:
aws:
s3:
bucket: techcourse-project-2024
bucket: touroot
image-base-uri: https://dev.touroot.kr/
temporary-storage-path: temporary/
image-storage-path: images/
Expand All @@ -26,10 +26,12 @@ management:
enabled: true
metrics:
enabled: true
prometheus:
enabled: true
endpoints:
web:
exposure:
include: info, health, metrics
include: prometheus, info, health, metrics
base-path: ENC(zc5tP1eNIEjv3uN5Kuih7wlo5zILgWxq)
enabled-by-default: false

Expand Down Expand Up @@ -136,6 +138,9 @@ cloud:
s3:
image-base-uri: https://dev.touroot.kr/
origin-storage-path: touroot-dev/

loki:
loki-url: http://loki:3100/loki/api/v1/push
---
# prod profile
spring:
Expand All @@ -154,16 +159,10 @@ spring:
console:
enabled: false
datasource:
writer:
jdbc-url: ENC(WmWa9T4FlLD0SWKenUhPZgRaUOEcYFt9tsw5MfpOmGfHF5lFMXiYCGElb3S4NBzWfpIxg3daIlhdEgUJaMv4CjmKPJzt2Mt3f/SPOI8rlMHwSA2IrjFw90mHPWJsGO2WPsAZEOX6TeNVpiIhE4nM2w==)
username: ENC(OD+ZUOLOgfa1s4CpW8wmCA==)
password: ENC(SvYVLaigwGxQjPS1yZKaqs4mDC4jUT2f)
driver-class-name: com.mysql.cj.jdbc.Driver
reader:
jdbc-url: ENC(K1rG1kXZV6c/xdrCt4Q/ANwoRneNZjXTppm65H/cuOjDnGNF8X+80yh7FIAvIbrP74royecVW18xk1O3gJAohEudC486T59hYpNJv2HaTiOJBavO5c9sH6UNbFN0kFYyT1nz9Y2uOkUt71fkW2YQ4A==)
username: ENC(7ap5OS9J40A2EaOxU/Qxyg==)
password: ENC(a79pqVIy4+TknqeGj6qtLumkNltqjcx5)
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
url: ENC(zfwbTfLkDkl/NeNTemoN+aK/VoS0rd6H2yFh+r6rKRIfj3IlYgVy32Y/0CfSdqXJaN6TyOOcVRs=)
username: ENC(JR+N+a5mb3AomBo+3xUE9A==)
password: ENC(3dbjjcIxMU86kQ3iU6zId/hLJzLM6KF+82dEd4g7/+c=)
jpa:
show-sql: false
properties:
Expand Down Expand Up @@ -193,3 +192,4 @@ cloud:
s3:
image-base-uri: https://touroot.kr/
origin-storage-path: touroot/

20 changes: 18 additions & 2 deletions backend/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<timestamp key="NOW" datePattern="yyyy-MM-dd"/>
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n" />
<property name="CONSOLE_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %green([%thread]) %highlight(%-5level) %boldWhite([%file:%yellow(%line)]) - %msg%n" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%file:%line] - %msg%n"/>
<property name="CONSOLE_PATTERN"
value="%d{yyyy-MM-dd HH:mm:ss.SSS} %green([%thread]) %highlight(%-5level) %boldWhite([%file:%yellow(%line)]) - %msg%n"/>

<springProperty name="LOKI_URL" source="loki.loki-url"/>
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
<http>
<url>${LOKI_URL}</url>
</http>
<format>
<label>
<pattern>app=touroot,host=${HOSTNAME},level=%level</pattern>
<readMarkers>true</readMarkers>
</label>
<message class="com.github.loki4j.logback.JsonLayout"/>
</format>
</appender>

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
Expand Down Expand Up @@ -78,6 +93,7 @@

<springProfile name="dev">
<root level="INFO">
<appender-ref ref="LOKI"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE-INFO"/>
<appender-ref ref="FILE-WARN"/>
Expand Down
Loading