Skip to content

fix: 배포 스크립트 작업 디렉터리 미설정으로 인한 부팅 실패 수정#195

Merged
unam98 merged 1 commit into
devfrom
hotfix/deploy-logdir-cwd
Jul 21, 2026
Merged

fix: 배포 스크립트 작업 디렉터리 미설정으로 인한 부팅 실패 수정#195
unam98 merged 1 commit into
devfrom
hotfix/deploy-logdir-cwd

Conversation

@unam98

@unam98 unam98 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

작업 배경

변경 사항

영역 내용
scripts/deploy.sh 스크립트 시작 시 cd "$APP_DIR" 추가

영향 범위

  • 근본 원인: CodeDeploy가 deploy.sh를 실행할 때 작업 디렉터리가 /(루트)라서, logback-spring.xml의 상대경로(./logs)가 /logs로 해석되어 ec2-user 권한으로 생성 불가 → Logback 초기화 실패 → 앱 부팅 자체가 실패
  • CodeDeploy 배포 로그(codedeploy-agent-deployments.log) 확인 결과 PR 모니터링 인프라 구축: ELK + Prometheus/Grafana + Slack 알림 #193(10:38), PR feat: OTel agent 감지 시 -javaagent 자동 적용 #194(11:18) 배포 모두 헬스체크 10회 실패로 "배포 실패" 기록되어 있었음. GitHub Actions는 aws deploy create-deployment 호출 후 결과를 기다리지 않는 구조라 워크플로우 자체는 "성공"으로 표시되어 발견이 늦어짐
  • cd "$APP_DIR" 추가로 상대경로가 앱 디렉터리 기준으로 올바르게 해석되어 로그 파일 생성 가능

Test Plan

  • bash -n scripts/deploy.sh 문법 검증
  • 머지 후 재배포되어 헬스체크 성공하는지 확인

🤖 Generated with Claude Code

CodeDeploy가 deploy.sh를 실행할 때 작업 디렉터리가 /(루트)라서,
logback-spring.xml의 상대경로(./logs)가 /logs로 해석되어 권한 오류로
앱 부팅이 실패하고 있었음 (PR #193부터 발생, staging 다운 상태였음).
스크립트 시작 시 APP_DIR로 cd하여 상대경로가 올바르게 해석되도록 수정.
@unam98 unam98 self-assigned this Jul 21, 2026
@unam98
unam98 merged commit e845749 into dev Jul 21, 2026
2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@unam98, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09b4053b-377c-4d7b-92c2-19053c0e2e00

📥 Commits

Reviewing files that changed from the base of the PR and between 6f56643 and 1edd69d.

📒 Files selected for processing (1)
  • scripts/deploy.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/deploy-logdir-cwd

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants