Skip to content

[WTH-239] 도메인 설정 반영 수정#46

Merged
hyxklee merged 1 commit intodevfrom
fix/WTH-239-도메인-설정
Apr 1, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/WTH-239-\ub3c4\uba54\uc778-\uc124\uc815"
Merged

[WTH-239] 도메인 설정 반영 수정#46
hyxklee merged 1 commit intodevfrom
fix/WTH-239-도메인-설정

Conversation

@hyxklee
Copy link
Copy Markdown
Contributor

@hyxklee hyxklee commented Apr 1, 2026

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

깃허브 액션 상에서 도메인을 변경한 경우 반영이 되지 않는 문제가 있어 수정했습니다.

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

""

Why

도메인 변경이 즉시 반영되지 않는 문제 수정

How

기존에 Caddy가 동작 중이었으면 reload만 진행하는데 이때 도메인 변경이 반영이 되지 않았습니다.
그래서 기존 값을 확인하고 변경되었다면 --force-recreate 하도록 수정했습니다.

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

✅ Checklist

  • PR 제목 설정 완료 (WTH-123 인증 필터 설정)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 배포 시 도메인 구성 변경을 감지하여 웹 서버를 자동으로 재구성합니다. 도메인이 변경될 때 설정이 즉시 적용되도록 개선했습니다.

@hyxklee hyxklee requested a review from soo0711 April 1, 2026 06:45
@hyxklee hyxklee self-assigned this Apr 1, 2026
@hyxklee hyxklee added the 🐞 BugFix 버그 수정 label Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

📝 Walkthrough

개요

두 배포 스크립트(개발 및 프로덕션)에서 도메인 변경 감지 로직이 추가되었습니다. 스크립트는 이제 기존 Caddy 컨테이너의 DOMAIN 환경 변수를 검사하고, 원하는 도메인과 비교하여 불일치 시 강제 재생성을 수행합니다.

변경 사항

Cohort / File(s) 요약
Caddy 배포 스크립트 도메인 검증
infra/dev/scripts/deploy.sh, infra/prod/scripts/deploy.sh
기존 Caddy 컨테이너에서 현재 도메인을 추출하여 원하는 도메인과 비교하는 로직 추가. 도메인이 변경되었으면 docker compose up -d --force-recreate caddy로 컨테이너 강제 재생성; 도메인이 일치하면 기존 reload/start 로직 유지.

예상 코드 리뷰 난이도

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 도메인 체크하는 스크립트 완성!
변수 비교로 똑똑하게 관리하니
Caddy도 기뻐 다시 태어나네
배포는 더욱 부드럽게 흘러가고
모든 설정이 반영되리! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 설명하고 있습니다. 'WTH-239 도메인 설정 반영 수정'은 도메인 설정 문제를 수정하는 것으로, raw_summary의 주요 변경사항과 일치합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed PR 설명이 대부분 완성되었으나 'What' 섹션이 비어있고 'Screenshots/Logs'와 'Reviewer 참고사항' 섹션도 작성되지 않았습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/WTH-239-도메인-설정

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6c025b2 and 1d89961.

📒 Files selected for processing (2)
  • infra/dev/scripts/deploy.sh
  • infra/prod/scripts/deploy.sh

Copy link
Copy Markdown
Collaborator

@soo0711 soo0711 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!!

@hyxklee hyxklee merged commit 8030bdc into dev Apr 1, 2026
2 checks passed
@hyxklee hyxklee deleted the fix/WTH-239-도메인-설정 branch April 1, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants