mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 11:26:26 +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>
25 lines
799 B
Docker
25 lines
799 B
Docker
# Multi-stage build for Spring Boot application
|
|
FROM eclipse-temurin:21-jre-alpine AS builder
|
|
WORKDIR /app
|
|
COPY build/libs/*.jar app.jar
|
|
RUN java -Djarmode=layertools -jar app.jar extract
|
|
|
|
FROM eclipse-temurin:21-jre-alpine
|
|
WORKDIR /app
|
|
|
|
# Create non-root user
|
|
RUN addgroup -S spring && adduser -S spring -G spring
|
|
USER spring:spring
|
|
|
|
# Copy layers from builder
|
|
COPY --from=builder /app/dependencies/ ./
|
|
COPY --from=builder /app/spring-boot-loader/ ./
|
|
COPY --from=builder /app/snapshot-dependencies/ ./
|
|
COPY --from=builder /app/application/ ./
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=60s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:8084/actuator/health || exit 1
|
|
|
|
ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"]
|