Skip to content

[SOU-489] 블루그린 배포 적용에 따른 시스템 모니터링 수정#221

Merged
bum0w0 merged 1 commit intodevelopfrom
feat/SOU-489-system-monitoring
Mar 12, 2026
Merged

[SOU-489] 블루그린 배포 적용에 따른 시스템 모니터링 수정#221
bum0w0 merged 1 commit intodevelopfrom
feat/SOU-489-system-monitoring

Conversation

@bum0w0
Copy link
Member

@bum0w0 bum0w0 commented Mar 12, 2026

Summary by CodeRabbit

변경 사항

  • 안정성 개선
    • 엄격한 오류 처리 강화로 시스템 모니터링 신뢰성 향상
    • 환경별 헬스 체크 및 알림 시스템 개선
    • Blue/Green 배포 환경 지원 추가
    • 컨테이너 상태 감지 및 서버 상태 알림 기능 강화

@bum0w0 bum0w0 added ci/cd 빌드, 배포, 워크플로우(파이프라인) 등 CI/CD 설정 변경에 사용합니다. feat 기존 기능을 개선하거나 새로운 기능을 추가하는 경우에 사용합니다. labels Mar 12, 2026
@bum0w0 bum0w0 merged commit 6c11111 into develop Mar 12, 2026
1 check passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0ebd48b-5de5-438c-a45a-b38d3d3e47c1

📥 Commits

Reviewing files that changed from the base of the PR and between faf324a and 7bc76e4.

📒 Files selected for processing (1)
  • deploy/shared/system-monitor.sh

전체 요약

배포 모니터링 스크립트에 환경 기반 조건부 로직이 추가되어, 프로덕션/개발 경로를 동적으로 선택하고 컨테이너 이름 및 헬스 체크 엔드포인트가 환경과 컬러(blue/green)에 따라 생성됩니다. 모든 알림 훅에 ENV 파라미터가 전달되도록 수정되었습니다.

변경사항

Cohort / File(s) Summary
System Monitor Script
deploy/shared/system-monitor.sh
엄격한 에러 핸들링 추가(set -e), WORK_DIR을 ENV 기반 조건부로 변경, CONTAINER_NAME과 HEALTH_CHECK_URL을 ENV/CONTAINER_COLOR로 동적 생성, 모든 notification 함수(notify_server_up, notify_server_down, notify_disk_warning, notify_memory_warning, notify_container_stopped)에 ENV 파라미터 추가

코드 리뷰 예상 난이도

🎯 3 (Moderate) | ⏱️ ~20분

관련 PR

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/SOU-489-system-monitoring
📝 Coding Plan for PR comments
  • Generate coding plan

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

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7bc76e40c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +40 to +41
CONTAINER_NAME="souzip-api-${CONTAINER_COLOR:-blue}"
case "$CONTAINER_COLOR" in

Choose a reason for hiding this comment

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

P1 Badge 활성 색상 기반으로 모니터 대상을 계산하세요

prod 분기에서 CONTAINER_COLOR를 기준으로 포트/컨테이너를 고르지만 이 스크립트는 .env에서 DISCORD_WEBHOOK_URL만 읽고 CONTAINER_COLOR를 로드하지 않아 unset 시 항상 blue(8081)로 고정됩니다. deploy/prod/scripts/deploy.sh는 blue/green을 번갈아 배포한 뒤 이전 색상을 down 하므로 green이 active인 배포 사이클에는 서비스가 정상이어도 헬스체크/컨테이너 중지 알림이 오탐될 수 있습니다; active 색상을 upstream에서 계산하거나 CONTAINER_COLOR를 확실히 주입하는 방식이 필요합니다.

Useful? React with 👍 / 👎.

@bum0w0 bum0w0 deleted the feat/SOU-489-system-monitoring branch March 14, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd 빌드, 배포, 워크플로우(파이프라인) 등 CI/CD 설정 변경에 사용합니다. feat 기존 기능을 개선하거나 새로운 기능을 추가하는 경우에 사용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant