mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 11:26:26 +00:00
- Redis read-only replica 에러 처리 추가 (SampleDataLoader) - MVP 환경에서 샘플 데이터 로딩 시 Redis 삭제 실패해도 계속 진행 - Swagger UI context-path 설정 수정 (SwaggerConfig) - 서버 URL에 /api/v1/analytics context-path 포함하여 올바른 curl 명령 생성 - Spring Security 경로 매칭 수정 (SecurityConfig) - context-path 제거된 실제 경로 (/events/**, /users/**) 매칭 - 403 Forbidden 에러 해결 - Dockerfile 빌드 경로 수정 - 멀티 모듈 프로젝트 구조에 맞게 JAR 복사 경로 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
834 B
Docker
25 lines
834 B
Docker
# Multi-stage build for Spring Boot application
|
|
FROM eclipse-temurin:21-jre-alpine AS builder
|
|
WORKDIR /app
|
|
COPY analytics-service/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:8086/api/v1/analytics/actuator/health || exit 1
|
|
|
|
ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"]
|