[WTH-378] Caddy 설정 수정#75
Hidden character warning
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthrough워크스루개발·운영 Caddy 설정에서 /stream SSE를 압축/버퍼링 대상에서 제외하고 관련 헤더를 추가했으며, 배포 스크립트들은 헬스체크를 데드라인 기반으로 바꾸고 caddy reload 반영을 admin API로 검증하도록 개선했습니다. 변경사항Caddy SSE 스트림 설정 및 배포 검증
Sequence DiagramsequenceDiagram
participant Deploy as deploy.sh
participant DockerExec as docker compose exec caddy
participant CaddyAdmin as Caddy Admin API /config/
Deploy->>DockerExec: caddy reload (capture output)
DockerExec-->>Deploy: reload_output, exit code
Deploy->>CaddyAdmin: caddy wget /config/
CaddyAdmin-->>Deploy: config JSON
alt new upstream present
Deploy->>Deploy: reload_ok=true -> "caddy reloaded"
else not present or reload failed
Deploy->>Deploy: reload_ok=false -> "falling back to restart"
Deploy->>DockerExec: docker compose restart caddy
end
예상 코드 리뷰 노력🎯 4 (Complex) | ⏱️ ~45 minutes 관련 PR
추천 라벨
추천 리뷰어
시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@infra/dev/scripts/deploy.sh`:
- Around line 44-63: The health-check loop can exit naturally when SECONDS >
health_check_deadline and skip the error handling; fix by detecting timeout
after the loop or by using a success flag: introduce a boolean (e.g.,
success=false) before the while using health_check_deadline and set success=true
only when the curl check succeeds (where you currently echo "[deploy] new app is
healthy" and break), then after the loop check if success is false or if SECONDS
is greater than or equal to health_check_deadline and in that case run the
existing failure cleanup (docker compose stop/rm and exit 1); reference symbols:
health_check_deadline, SECONDS, HEALTH_CHECK_TIMEOUT_SECONDS, curl invocation,
sleep, and the docker compose stop/rm/exit 1 block.
In `@infra/prod/scripts/deploy.sh`:
- Around line 44-63: The health-check loop exits silently if sleep pushes
SECONDS past health_check_deadline, skipping the failure cleanup; update the
logic in the loop that uses health_check_deadline and SECONDS (the while [
"$SECONDS" -le "$health_check_deadline" ] loop and the sleep
"$HEALTH_CHECK_INTERVAL_SECONDS" line) to ensure the timeout path always runs:
either change the loop to while true and perform the timeout check (the if [
"$SECONDS" -ge "$health_check_deadline" ] block that stops/rms "app-$NEW_COLOR"
via docker compose) after each sleep, or keep the loop condition but add a
post-loop check that runs the same docker compose stop/rm + exit 1 when SECONDS
>= health_check_deadline; mirror the exact fix applied to the dev script so the
curl health check to "http://127.0.0.1:${NEW_HEALTH_PORT}/actuator/health"
reliably triggers the cleanup on timeout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3ef39e3e-df5e-4be9-8f2b-82a6a6e38f6d
📒 Files selected for processing (3)
README.mdinfra/dev/scripts/deploy.shinfra/prod/scripts/deploy.sh
✅ Files skipped from review due to trivial changes (1)
- README.md
📌 Summary
Caddy 설정을 일부 수정했습니다
📝 Changes
What
""
Why
How
/stream엔드포인트에서는 압축을 사용하지 않도록 수정📸 Screenshots / Logs
💡 Reviewer 참고사항
✅ Checklist
Summary by CodeRabbit