mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2026-01-21 13:26:23 +00:00
주요 변경사항: - HuggingFace 관련 코드 및 의존성 완전 제거 - HuggingFaceImageGenerator.java 삭제 - HuggingFaceApiClient.java 삭제 - HuggingFaceRequest.java 삭제 - Resilience4j의 HuggingFace CircuitBreaker 제거 - Kubernetes 배포 설정 - Deployment: content-service-deployment.yaml 업데이트 - Service: content-service-service.yaml 추가 - Health check 경로 수정 (/api/v1/content/actuator/health) - Dockerfile 추가 (멀티스테이지 빌드) - Spring Boot 설정 최적화 - application.yml: context-path 설정 (/api/v1/content) - HuggingFace 설정 제거, Replicate API 설정 유지 - CORS 설정: kt-event-marketing* 도메인 허용 - Controller 경로 수정 - ContentController: @RequestMapping 중복 제거 - context-path와의 충돌 해결 - Security 설정 - Chrome DevTools 경로 예외 처리 추가 (/.well-known/**) - CORS 설정 강화 - Swagger/OpenAPI 설정 - VM Development Server URL 추가 - 서버 URL 우선순위 조정 - 환경 변수 통일 - REPLICATE_API_KEY → REPLICATE_API_TOKEN으로 변경 테스트 결과: ✅ Replicate API 정상 작동 (이미지 생성 성공) ✅ Azure Blob Storage 업로드 성공 ✅ Redis 연결 정상 (마스터 노드 연결) ✅ Swagger UI 정상 작동 ✅ 모든 API 엔드포인트 정상 응답 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
spring:
|
|
application:
|
|
name: content-service
|
|
|
|
# Redis Configuration
|
|
data:
|
|
redis:
|
|
enabled: ${REDIS_ENABLED:true}
|
|
host: ${REDIS_HOST:20.214.210.71}
|
|
port: ${REDIS_PORT:6379}
|
|
password: ${REDIS_PASSWORD:Hi5Jessica!}
|
|
timeout: ${REDIS_TIMEOUT:2000ms}
|
|
lettuce:
|
|
pool:
|
|
max-active: ${REDIS_POOL_MAX:8}
|
|
max-idle: ${REDIS_POOL_IDLE:8}
|
|
min-idle: ${REDIS_POOL_MIN:0}
|
|
max-wait: ${REDIS_POOL_WAIT:-1ms}
|
|
database: ${REDIS_DATABASE:0}
|
|
|
|
# JWT Configuration
|
|
jwt:
|
|
secret: ${JWT_SECRET:kt-event-marketing-jwt-secret-key-for-authentication-and-authorization-2025}
|
|
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:3600000}
|
|
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:604800000}
|
|
|
|
# Azure Blob Storage Configuration
|
|
azure:
|
|
storage:
|
|
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=blobkteventstorage;AccountKey=tcBN7mAfojbl0uGsOpU7RNuKNhHnzmwDiWjN31liSMVSrWaEK+HHnYKZrjBXXAC6ZPsuxUDlsf8x+AStd++QYg==;EndpointSuffix=core.windows.net}
|
|
container-name: ${AZURE_CONTAINER_NAME:content-images}
|
|
|
|
# Replicate API Configuration (Stable Diffusion)
|
|
replicate:
|
|
api:
|
|
url: ${REPLICATE_API_URL:https://api.replicate.com}
|
|
token: ${REPLICATE_API_TOKEN:}
|
|
model:
|
|
version: ${REPLICATE_MODEL_VERSION:stability-ai/sdxl:39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b}
|
|
|
|
# CORS Configuration
|
|
cors:
|
|
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:*}
|
|
|
|
# Actuator
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus
|
|
base-path: /actuator
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
show-components: always
|
|
health:
|
|
livenessState:
|
|
enabled: true
|
|
readinessState:
|
|
enabled: true
|
|
|
|
# OpenAPI Documentation
|
|
springdoc:
|
|
api-docs:
|
|
path: /v3/api-docs
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
tags-sorter: alpha
|
|
operations-sorter: alpha
|
|
show-actuator: false
|
|
|
|
# Logging
|
|
logging:
|
|
level:
|
|
com.kt.event.content: ${LOG_LEVEL_APP:DEBUG}
|
|
org.springframework.web: ${LOG_LEVEL_WEB:INFO}
|
|
root: ${LOG_LEVEL_ROOT:INFO}
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
|
|
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file:
|
|
name: ${LOG_FILE_PATH:logs/content-service.log}
|
|
logback:
|
|
rollingpolicy:
|
|
max-file-size: ${LOG_FILE_MAX_SIZE:10MB}
|
|
max-history: ${LOG_FILE_MAX_HISTORY:7}
|
|
total-size-cap: ${LOG_FILE_TOTAL_CAP:100MB}
|
|
|
|
# Server Configuration
|
|
server:
|
|
port: ${SERVER_PORT:8084}
|
|
servlet:
|
|
context-path: /api/v1/content
|