Skip to content

fix: CI/CD 이미지명, 경로, health check 엔드포인트 수정#54

Merged
Woomin-Wang merged 7 commits into
mainfrom
chore/ci-cd
Apr 22, 2026
Merged

fix: CI/CD 이미지명, 경로, health check 엔드포인트 수정#54
Woomin-Wang merged 7 commits into
mainfrom
chore/ci-cd

Conversation

@Woomin-Wang
Copy link
Copy Markdown
Contributor

📝 작업 내용 (Description)

CI/CD 이미지명, 경로, health check 엔드포인트 수정

🔄 변경 유형 (Type of Change)

  • ✨ 새로운 기능 (feat)
  • 🐛 버그 수정 (fix)
  • 📝 문서 수정 (docs)
  • 💄 스타일 (style)
  • ♻️ 리팩토링 (refactor)
  • ✅ 테스트 (test)
  • 🔧 기타 (chore)

✅ 체크리스트 (Checklist)

  • 코드가 정상적으로 동작하는지 확인했습니다
  • 기존 테스트가 통과합니다
  • 필요한 경우 새로운 테스트를 추가했습니다

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces production-ready configurations, including a new docker-compose-prod.yml with Fluent Bit logging and a PostgreSQL service, and adds Spring Boot Actuator for monitoring. Several critical issues were identified: the hibernate.ddl-auto setting in the production profile was changed to update, which poses a high risk of data loss; the Dockerfile health check uses an incorrect path and an impractical 24-hour interval; the development compose file points to a backup Dockerfile; and the production image uses the latest tag, compromising deployment stability.

jpa:
hibernate:
ddl-auto: validate
ddl-auto: update
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

운영 환경(prod)에서 hibernate.ddl-autoupdate로 설정하는 것은 매우 위험합니다. 의도치 않은 스키마 변경으로 인해 데이터가 유실되거나 서비스 장애가 발생할 수 있습니다. 운영 환경에서는 반드시 validate 또는 none을 사용해야 합니다.

      ddl-auto: validate

Comment thread Dockerfile
Comment on lines +36 to +37
HEALTHCHECK --interval=24h --timeout=10s --start-period=40s --retries=3 \
CMD curl -sf http://localhost:7300/health || exit 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

HEALTHCHECK 설정에 두 가지 개선 사항이 있습니다.

  1. 경로 불일치: spring-boot-starter-actuator를 의존성에 추가하셨는데, 기본 헬스체크 경로는 /actuator/health입니다. 현재 /health로 설정되어 있어 Docker daemon이 컨테이너를 unhealthy 상태로 판단할 수 있습니다.
  2. 주기(Interval) 설정: interval=24h는 장애 감지 주기가 너무 깁니다. 컨테이너 상태를 적절히 모니터링하기 위해 보통 30s 정도로 설정하는 것을 권장합니다.
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
  CMD curl -sf http://localhost:7300/actuator/health || exit 1

Comment thread docker-compose-dev.yml
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.prev
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

dockerfile 경로가 Dockerfile.prev로 지정되어 있습니다. 이는 보통 백업 파일로 사용되는 명칭입니다. 개발 환경에서 최신 설정을 반영하기 위해 Dockerfile을 사용하도록 수정하는 것이 적절해 보입니다.

      dockerfile: Dockerfile

Comment thread docker-compose-prod.yml
restart: unless-stopped

app:
image: ghcr.io/wisoft-prepair/backend-java:latest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

운영 환경 배포 시 latest 태그를 사용하는 것은 권장되지 않습니다. latest 태그는 시점에 따라 가리키는 이미지가 달라질 수 있어 배포의 재현성을 보장하기 어렵고 롤백 시 혼선을 줄 수 있습니다. 특정 버전 태그나 커밋 해시를 사용하는 것이 안전합니다.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Woomin-Wang Woomin-Wang merged commit 931a144 into main Apr 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant