mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 10:46:23 +00:00
- Dockerfile에 gcompat 패키지 추가하여 Snappy 네이티브 라이브러리 지원 - application.yml에 AI Service Feign Client URL 설정 추가 - deployment.yaml 수정: * 이미지 태그를 latest에서 dev로 변경 * Health check 경로 수정 (/api/v1/events/actuator → /api/v1/actuator) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
901 B
Docker
28 lines
901 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
|
|
|
|
# Install glibc compatibility for Snappy native library
|
|
RUN apk add --no-cache gcompat
|
|
|
|
# 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:8080/api/v1/events/actuator/health || exit 1
|
|
|
|
ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"]
|