-
Notifications
You must be signed in to change notification settings - Fork 1
[#67] 업로드 조건 수정, docker network 보정 #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough모니터링 배포 워크플로의 트리거 경로가 제한되었고, 원격 업로드 대상 경로가 홈 디렉터리로 변경되었습니다. docker-compose 구성에서는 공용 네트워크 이름을 명시하고, 모니터링 스택이 외부 네트워크를 사용하도록 전환되었습니다. Prometheus 스크랩 대상이 gamchi-app:8080으로 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions (deploy-monitoring)
participant SSH as Remote Host
participant DC as docker-compose
Dev->>GH: Push (paths: monitoring/**, workflow file)
GH->>SSH: Upload artifacts to "~/" (changed)
Note over GH,SSH: DEPLOY_DIR in script: ~/monitoring (mismatch risk)
GH->>SSH: Run deploy script (uses DEPLOY_DIR)
SSH->>DC: docker-compose -f monitoring/docker-compose.yml up -d
sequenceDiagram
autonumber
participant DC as docker-compose (monitoring)
participant Net as docker network "gamchi-network" (external)
participant App as gamchi-app
participant Prom as Prometheus
DC->>Net: Connect services to external network
Note over DC,Net: Requires pre-existing "gamchi-network"
Prom->>App: Scrape http://gamchi-app:8080/actuator/prometheus
Prom-->>Prom: Relabel as configured
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
docker-compose-deploy.yml (1)
48-48: 파일 끝 개행(newline) 누락YAMLlint 경고(new-line-at-end-of-file)를 없애기 위해 파일 말미에 개행을 추가해 주세요. 기능 영향은 없습니다.
gamchi-network: driver: bridge name: gamchi-network +.github/workflows/deploy-monitoring.yml (1)
35-35: 원격 업로드 타깃 경로를 명시적으로 고정해 혼동 방지
source: "monitoring/"+target: "~/"조합은 대부분~/monitoring에 디렉터리 전체가 업로드되어 현재 스크립트의DEPLOY_DIR=~/monitoring와 실질적으로 일치합니다. 다만 액션별/버전별 동작 차이를 제거하려면 “대상 디렉터리 고정 + 내용물만 업로드”가 더 명확합니다.아래처럼 바꾸면 중첩 디렉터리(
~/monitoring/monitoring) 생성 가능성을 확실히 제거할 수 있습니다.- source: "monitoring/" - target: "~/" + # 디렉터리 내용물만 업로드 + source: "monitoring/*" + target: "~/monitoring"변경 후 최초 1회 배포에서
~/monitoring부재 시 자동 생성되는지(현재는mkdir -p $DEPLOY_DIR가 있으므로 OK)와 업로드 경로가 기대대로 매핑되는지 한 번 확인 부탁드립니다.monitoring/docker-compose.yml (2)
33-35: 외부 네트워크 의존성에 대한 배포 안전장치 제안
external: true로 전환하면 네트워크가 미리 존재하지 않을 경우docker compose up이 실패합니다. 모니터링 배포 워크플로에 “없으면 생성” 가드를 추가하는 것을 권장드립니다.예:
.github/workflows/deploy-monitoring.yml의 SSH 스크립트 내에 아래 한 줄 추가DEPLOY_DIR=~/monitoring mkdir -p $DEPLOY_DIR cd $DEPLOY_DIR + docker network inspect gamchi-network >/dev/null 2>&1 || docker network create gamchi-network또는 이 파일의 네트워크 섹션에 실제 네트워크명을 명시해 의도를 문서화할 수 있습니다(기능 동일).
networks: gamchi-network: - external: true + external: true + name: gamchi-network
35-35: 파일 끝 개행(newline) 누락YAMLlint 경고를 제거하기 위해 마지막 줄 뒤에 개행을 추가해 주세요.
networks: gamchi-network: external: true +
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
.github/workflows/deploy-monitoring.yml(2 hunks)docker-compose-deploy.yml(1 hunks)monitoring/docker-compose.yml(1 hunks)monitoring/prometheus/prometheus.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
monitoring/docker-compose.yml
[error] 35-35: no new line character at the end of file
(new-line-at-end-of-file)
docker-compose-deploy.yml
[error] 48-48: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (3)
docker-compose-deploy.yml (1)
45-48: 명시적 네트워크 이름 지정으로 교차 스택 통신 안정화 — 좋습니다
name: gamchi-network를 지정해 모니터링 스택(external: true)과 동일한 네트워크 이름을 보장합니다. 런타임에 Compose 프로젝트 접두사로 인한 네이밍 변화가 없어져 접근성이 안정화됩니다..github/workflows/deploy-monitoring.yml (1)
7-9: 트리거 경로 필터 추가로 불필요한 배포 방지 — 좋습니다모니터링 관련 변경에만 워크플로가 동작하도록 한 점이 배포 소음과 리소스 낭비를 줄입니다.
monitoring/prometheus/prometheus.yml (1)
13-13: 스크랩 타깃을 컨테이너명(gamchi-app)으로 전환 — 네트워크 모델과 정합성 확인 필요
gamchi-app:8080으로 변경은 외부 네트워크 상에서 컨테이너명 DNS를 활용하려는 의도로 보이며,docker-compose-deploy.yml의container_name: gamchi-app(Line 29)과 일관됩니다. 다만 다음을 확인해 주세요:
- 모니터링 스택이 접속하는 네트워크가 애플리케이션 컨테이너와 동일한
gamchi-network인지.- 첫 배포 시 해당 네트워크가 이미 존재해 Prometheus가
gamchi-app을 정상 해석하는지.필요 시 서비스명(alias) 대신 컨테이너명에 의존한다는 점을 README/런북에 명시해 두면 향후 컨테이너명 변경 리스크를 줄일 수 있습니다.
📌 관련 이슈
#67
📝 작업 개요
metrics 수집을 위한 추가 작업
✅ 작업 사항
Summary by CodeRabbit
Chores
Refactor