Skip to content

Conversation

@LeeCh0129
Copy link
Contributor

@LeeCh0129 LeeCh0129 commented Jul 21, 2025

📌 변경 사항 개요

#63 브랜치를 머지한 후, deploy.yml 워크플로우의 deploy 잡이 헬스 체크(Health Check) 단계에서 실패했습니다.

로그 확인 결과, 헬스 체크 스크립트가 curl -f http://localhost:3000을 호출하여 Next.js 컨테이너에 직접 접근하려고 시도했으나, 보안상의 이유로 3000번 포트는 외부에 노출되어 있지 않아 연결이 거부되었습니다.

📝 상세 내용

헬스 체크 경로를 실제 사용자 접근 경로와 동일하게 Nginx를 통하도록 curl -f http://localhost로 변경

🔗 관련 이슈

🖼️ 스크린샷(선택사항)

💡 참고 사항

Summary by CodeRabbit

  • Chores
    • 배포 스크립트의 헬스 체크 URL이 http://localhost:3000에서 http://localhost로 변경되었습니다.
    • 최종 헬스 체크 실패 시, 기존 nextjs 컨테이너 로그와 함께 nginx 컨테이너 로그도 출력됩니다.

@LeeCh0129 LeeCh0129 self-assigned this Jul 21, 2025
@LeeCh0129 LeeCh0129 added the 🐞 bug 버그관련 label Jul 21, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 21, 2025

Walkthrough

배포 워크플로우의 헬스 체크 URL이 http://localhost:3000에서 http://localhost로 변경되었습니다. 또한, 헬스 체크 실패 시 기존의 nextjs 컨테이너 로그 외에 nginx 컨테이너 로그도 출력하도록 수정되었습니다.

Changes

파일/경로 변경 요약
.github/workflows/deploy.yml 헬스 체크 URL을 3000포트에서 루트로 변경, 실패 시 nginx 로그 추가 출력

Estimated code review effort

1 (<30 minutes)

Suggested labels

🌏 Deploy

Suggested reviewers

  • minimo-9
  • BokyungCodes
  • evaain706

Poem

배포 토끼가 깡충깡충 뛰며
헬스 체크도 꼼꼼히 살피네!
3000번 대신 루트로 점프,
nginx 로그도 챙겨보는 센스~
오늘도 배포는 순항 중,
토끼의 파이프라인은 늘 든든! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8c3c69 and a05c84c.

📒 Files selected for processing (1)
  • .github/workflows/deploy.yml (3 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/deploy.yml

[error] 177-177: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (3)
.github/workflows/deploy.yml (3)

135-143: 헬스 체크 URL 하드코딩 대신 변수화 및 타임아웃 옵션 추가 고려

curl -f http://localhost 로 직접 하드코딩되어 있습니다. 향후 포트‧프로토콜 변경이나 헬스 엔드포인트 경로 변경 시 워크플로 수정이 반복될 수 있으므로,

  1. HEALTHCHECK_URL 환경변수를 선언해 두고 사용하거나
  2. curl --connect-timeout 2 --retry 30 --retry-delay 2 "$HEALTHCHECK_URL" 처럼 --retry/--connect-timeout 옵션을 활용해 루프를 없애고 YAML을 단순화

하는 방안을 고민해 보시면 유지보수성이 좋아집니다.
[ suggest_optional_refactor ]


146-150: nginx 로그 추가는 👍 하지만 nextjs 로그 순서 유지 권장

헬스 체크 실패 시 nginx 로그를 추가로 출력하도록 한 점은 문제 파악에 큰 도움이 됩니다. 다만 현재 nextjs → nginx 순으로 로그를 출력하고 있어 자연스럽게 역순으로 섞일 수 있습니다. 동일한 컨텍스트 유지 차원에서 nginx 로그를 먼저 출력하고 이어서 nextjs 로그를 출력하거나, 각 로그 앞에 구분 헤더를 출력해 가독성을 높여 주세요.
[ suggest_nitpick ]


177-177: 파일 끝 개행 문자 누락

YAMLlint 경고대로 파일 마지막에 새 줄이 없습니다. 일부 툴에서 diff-noise나 경고를 유발할 수 있으니 개행을 추가해 주세요.

-          fi
\ No newline at end of file
+          fi
+

[ suggest_nitpick ]


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LeeCh0129 LeeCh0129 merged commit 635f3e5 into develop Jul 21, 2025
2 checks passed
@LeeCh0129 LeeCh0129 deleted the fix/65 branch July 21, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug 버그관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] CD 파이프라인 헬스 체크 오류

4 participants