Conversation
📝 Walkthrough개요두 배포 스크립트(개발 및 프로덕션)에서 도메인 변경 감지 로직이 추가되었습니다. 스크립트는 이제 기존 Caddy 컨테이너의 변경 사항
예상 코드 리뷰 난이도🎯 2 (Simple) | ⏱️ ~10 minutes 시
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
infra/dev/scripts/deploy.sh (1)
51-61: 코드 중복 고려: 공통 로직 추출 가능성현재 dev와 prod 스크립트의 도메인 비교 및 Caddy 재생성 로직이 거의 동일합니다. 향후 유지보수 시 양쪽을 모두 수정해야 하는 부담이 있을 수 있습니다.
공통 함수를 별도 스크립트(
common.sh)로 추출하거나, 환경 변수(컨테이너 이름 등)만 다르게 주입하는 방식을 고려해볼 수 있습니다.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@infra/dev/scripts/deploy.sh` around lines 51 - 61, The domain-check-and-recreate logic (variables CURRENT_DOMAIN, DOMAIN and the docker compose branches that run docker compose up -d --force-recreate caddy / docker compose exec caddy caddy reload ...) is duplicated between dev and prod scripts; extract it into a shared function (e.g., manage_caddy or ensure_caddy) in a new common.sh and source it from both deploy scripts, and parameterize container/service name and DOMAIN as arguments or env vars so the same function is reused; update dev and prod deploy.sh to call the shared function with the appropriate container/service name instead of duplicating the conditional logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@infra/dev/scripts/deploy.sh`:
- Around line 51-61: The domain-check-and-recreate logic (variables
CURRENT_DOMAIN, DOMAIN and the docker compose branches that run docker compose
up -d --force-recreate caddy / docker compose exec caddy caddy reload ...) is
duplicated between dev and prod scripts; extract it into a shared function
(e.g., manage_caddy or ensure_caddy) in a new common.sh and source it from both
deploy scripts, and parameterize container/service name and DOMAIN as arguments
or env vars so the same function is reused; update dev and prod deploy.sh to
call the shared function with the appropriate container/service name instead of
duplicating the conditional logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 924e1663-ba40-4bd3-afbc-ad848c4f9c5a
📒 Files selected for processing (2)
infra/dev/scripts/deploy.shinfra/prod/scripts/deploy.sh
📌 Summary
깃허브 액션 상에서 도메인을 변경한 경우 반영이 되지 않는 문제가 있어 수정했습니다.
📝 Changes
What
""
Why
도메인 변경이 즉시 반영되지 않는 문제 수정
How
기존에 Caddy가 동작 중이었으면 reload만 진행하는데 이때 도메인 변경이 반영이 되지 않았습니다.
그래서 기존 값을 확인하고 변경되었다면
--force-recreate하도록 수정했습니다.📸 Screenshots / Logs
💡 Reviewer 참고사항
✅ Checklist
Summary by CodeRabbit
릴리스 노트