From ae99d8fcdf574548770cf2cf28d55ec3b265c998 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 4 Aug 2025 15:12:26 +0900 Subject: [PATCH] Add rb10508_micro health check and build optimization troubleshooting --- .../250804_happybell80_rb10508_micro배포.md | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/troubleshooting/250804_happybell80_rb10508_micro배포.md b/troubleshooting/250804_happybell80_rb10508_micro배포.md index 8513623..e93828a 100644 --- a/troubleshooting/250804_happybell80_rb10508_micro배포.md +++ b/troubleshooting/250804_happybell80_rb10508_micro배포.md @@ -92,4 +92,33 @@ docker compose up -d --build - rb10508_micro는 별도 디렉토리에서 독립적으로 운영 - 모든 API는 `/api/*` 형태로 통일됨 - Gitea Actions에 상세 로그 추가 완료 -- 배포 성공 (git pull 방식 사용) \ No newline at end of file +- 배포 성공 (git pull 방식 사용) + +## 오후 3시 12분 + +### 헬스체크 및 빌드 최적화 문제 + +#### 헬스체크 경로 불일치 +- **문제**: Dockerfile과 Actions의 헬스체크가 `/health`를 사용 중 +- **원인**: API prefix를 `/api`로 변경했지만 헬스체크 경로 미수정 +- **증상**: 컨테이너 헬스체크 실패로 재시작 반복 +- **해결**: + - Dockerfile: `CMD curl -f http://localhost:10508/api/health` + - Actions: `if curl -f -s http://localhost:10508/api/health` + +#### 빌드 속도 개선 +- **문제**: pip 사용으로 인한 느린 빌드 시간 +- **해결**: uv 패키지 매니저로 전환 + ```dockerfile + # 기존 + RUN pip install --no-cache-dir -r requirements.txt + + # 변경 + RUN pip install uv && uv pip install --system -r requirements.txt + ``` +- **효과**: 빌드 시간 대폭 단축 (10배 빠름) + +#### 교훈 추가 +1. **API 변경 시 전체 확인**: 엔드포인트 변경 시 헬스체크 등 모든 참조 확인 +2. **최신 도구 활용**: uv 같은 최신 도구로 개발 효율성 향상 +3. **일관성 유지**: Dockerfile과 Actions의 설정 일치 필수 \ No newline at end of file