- GitHub Actions workflow로 백엔드 서비스 자동 빌드/배포 구성 - Kustomize를 통한 dev/staging/prod 환경별 설정 관리 - 각 마이크로서비스별 Dockerfile 추가 - 배포 자동화 스크립트 및 환경 변수 설정 - CI/CD 가이드 문서 작성
170 lines
4.3 KiB
YAML
170 lines
4.3 KiB
YAML
spring:
|
|
application:
|
|
name: event-service
|
|
|
|
# Database Configuration (PostgreSQL)
|
|
datasource:
|
|
url: jdbc:postgresql://${DB_HOST:20.249.177.232}:${DB_PORT:5432}/${DB_NAME:eventdb}
|
|
username: ${DB_USERNAME:eventuser}
|
|
password: ${DB_PASSWORD:Hi5Jessica!}
|
|
driver-class-name: org.postgresql.Driver
|
|
hikari:
|
|
maximum-pool-size: 5
|
|
minimum-idle: 2
|
|
connection-timeout: 30000
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
|
|
# JPA Configuration
|
|
jpa:
|
|
database-platform: org.hibernate.dialect.PostgreSQLDialect
|
|
hibernate:
|
|
ddl-auto: ${DDL_AUTO:update}
|
|
properties:
|
|
hibernate:
|
|
format_sql: false
|
|
show_sql: false
|
|
use_sql_comments: false
|
|
jdbc:
|
|
batch_size: 20
|
|
time_zone: Asia/Seoul
|
|
open-in-view: false
|
|
|
|
# Redis Configuration
|
|
data:
|
|
redis:
|
|
host: ${REDIS_HOST:20.214.210.71}
|
|
port: ${REDIS_PORT:6379}
|
|
password: ${REDIS_PASSWORD:Hi5Jessica!}
|
|
database: ${REDIS_DATABASE:0}
|
|
timeout: 60000ms
|
|
connect-timeout: 60000ms
|
|
lettuce:
|
|
pool:
|
|
max-active: 5
|
|
max-idle: 3
|
|
min-idle: 1
|
|
max-wait: -1ms
|
|
shutdown-timeout: 200ms
|
|
|
|
# Kafka Configuration
|
|
kafka:
|
|
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:20.249.182.13:9095,4.217.131.59:9095}
|
|
producer:
|
|
key-serializer: org.apache.kafka.common.serialization.StringSerializer
|
|
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
|
|
properties:
|
|
spring.json.add.type.headers: false
|
|
consumer:
|
|
group-id: event-service-consumers
|
|
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
|
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
|
|
properties:
|
|
spring.json.trusted.packages: "*"
|
|
spring.json.use.type.headers: false
|
|
auto-offset-reset: earliest
|
|
enable-auto-commit: false
|
|
listener:
|
|
ack-mode: manual
|
|
|
|
# Server Configuration
|
|
server:
|
|
port: ${SERVER_PORT:8080}
|
|
servlet:
|
|
context-path: /api/v1/events
|
|
shutdown: graceful
|
|
|
|
# Actuator Configuration
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus
|
|
base-path: /actuator
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
show-components: always
|
|
health:
|
|
redis:
|
|
enabled: false
|
|
livenessState:
|
|
enabled: true
|
|
readinessState:
|
|
enabled: true
|
|
|
|
# Logging Configuration
|
|
logging:
|
|
level:
|
|
root: INFO
|
|
com.kt.event: ${LOG_LEVEL:INFO}
|
|
org.springframework: WARN
|
|
org.springframework.data.redis: WARN
|
|
io.lettuce.core: WARN
|
|
org.hibernate.SQL: ${SQL_LOG_LEVEL:WARN}
|
|
org.hibernate.type.descriptor.sql.BasicBinder: WARN
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file:
|
|
name: ${LOG_FILE:logs/event-service.log}
|
|
logback:
|
|
rollingpolicy:
|
|
max-file-size: 10MB
|
|
max-history: 7
|
|
total-size-cap: 100MB
|
|
|
|
# Springdoc OpenAPI Configuration
|
|
springdoc:
|
|
api-docs:
|
|
path: /api-docs
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
operations-sorter: method
|
|
tags-sorter: alpha
|
|
show-actuator: false
|
|
|
|
# Feign Client Configuration
|
|
feign:
|
|
client:
|
|
config:
|
|
default:
|
|
connectTimeout: 5000
|
|
readTimeout: 10000
|
|
loggerLevel: basic
|
|
|
|
# Content Service Client
|
|
content-service:
|
|
url: ${CONTENT_SERVICE_URL:http://localhost:8084}
|
|
|
|
# Distribution Service Client
|
|
distribution-service:
|
|
url: ${DISTRIBUTION_SERVICE_URL:http://localhost:8085}
|
|
|
|
# Application Configuration
|
|
app:
|
|
kafka:
|
|
topics:
|
|
ai-event-generation-job: ai-event-generation-job
|
|
image-generation-job: image-generation-job
|
|
event-created: event-created
|
|
|
|
redis:
|
|
ttl:
|
|
ai-result: 86400 # 24시간 (초 단위)
|
|
image-result: 604800 # 7일 (초 단위)
|
|
key-prefix:
|
|
ai-recommendation: "ai:recommendation:"
|
|
image-generation: "image:generation:"
|
|
job-status: "job:status:"
|
|
|
|
job:
|
|
timeout:
|
|
ai-generation: 300000 # 5분 (밀리초 단위)
|
|
image-generation: 300000 # 5분 (밀리초 단위)
|
|
|
|
# JWT Configuration
|
|
jwt:
|
|
secret: ${JWT_SECRET:default-jwt-secret-key-for-development-minimum-32-bytes-required}
|
|
expiration: 86400000 # 24시간 (밀리초 단위)
|