-
Notifications
You must be signed in to change notification settings - Fork 8
fix: 운영환경 8081 포트 설정 추가 #542
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
fix: 운영환경 8081 포트 설정 추가 #542
Conversation
Walkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-25T10:59:42.734ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
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.
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 (1)
docker-compose.prod.yml (1)
25-27: 선택사항: 포트 용도 명시 주석 추가metrics endpoint의 목적을 명확히 하기 위해 간단한 주석을 추가하는 것을 고려해보세요. 이는 향후 유지보수 시 포트의 용도를 명확히 합니다.
ports: - "8080:8080" + - "8081:8081" # Prometheus metrics endpoint (/actuator/prometheus)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker-compose.prod.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-25T10:59:42.734Z
Learnt from: whqtker
PR: solid-connection/solid-connect-server#481
File: docs/infra-config/nginx.conf:36-36
Timestamp: 2025-08-25T10:59:42.734Z
Learning: When using network_mode: host in Docker Compose, containers share the host's network namespace, so nginx proxy_pass should target localhost:PORT instead of container service names like solid-connection-server:PORT.
Applied to files:
docker-compose.prod.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
docker-compose.prod.yml (1)
27-27: metrics endpoint 포트 매핑 추가 — 문제 해결을 위한 필요한 변경포트 8081 매핑이 추가되어 production 환경에서 Prometheus metrics endpoint를 접근 가능하게 만들었습니다. 이는 PR #540의 Grafana 메트릭 수집 문제를 직접 해결하는 변경입니다.
변경 사항:
solid-connection-server서비스에- "8081:8081"포트 매핑 추가- bridge network 모드에서 metrics 엔드포인트를 호스트로 노출
- 기존 8080 포트 매핑과 동일한 패턴으로 구성
다음을 확인해주세요:
- 컨테이너 내 Spring Boot actuator가 실제로 포트 8081에서 metrics를 제공하는지 확인
curl http://localhost:8081/actuator/prometheus호출이 production에서 정상 작동하는지 검증- Stage 환경과의 일관성 확인 (stage도 8081 포트가 열려있는지 확인)
저도 stage도 bridge 방식으로 통일하는게 좋은 것 같습니다 |
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.
제가 아는 바로는 bridge모드로 실행할 경우, 네트워크 격리 때문에 추가 오버헤드가 생기는 걸로 알고 있습니다만 그리 크지 않다고 알고 있습니다! 그렇기에 저는 네트워크 격리로 인한 오버헤드가 그리 크지 않다면 네트워크 격리로 인한 보안 등에서의 장점이 더 좋게 느껴지네요! stage환경도 bridge모드로 일치시키는 건 저는 찬성입니다!
Hexeong
left a comment
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.
확인했습니다! 수고 많으셨어용
fix: PostRepository & CommentRepository의 일부 메서드의 정렬 순서 오류 해결 (#522) refactor: 이메일 유니크키 제거 refactor: 엔티티가 BaseEntity를 상속하도록 (#524) fix: BaseEntity 관련 마이그레이션 파일 수정 (#530) feat: 멘토 승격 api 구현 (#532) fix: 대학교 중복 오류 수정 (#510) refactor: 불필요한 로그 삭제 (#543) fix: 운영환경 8081 포트 설정 추가 (#542) fix: dev환경 디비명 변경 (#546) refactor: 불필요한 로그 삭제 (#547) refactor: 학기를 테이블로 관리하도록 변경 (#526) refactor: 모의지원 시 지원한 대학 정보 응답 추가 (#539)



관련 이슈
작업 내용
문제
운영 서버에서 Grafana 메트릭이 수집되지 않는 문제
원인
운영 서버의 Docker 컨테이너에서 8081 포트(메트릭 엔드포인트)가 외부로 노출되지 않음
환경 차이
Stage: network_mode: host 사용 → 모든 포트 자동 노출
운영: bridge 네트워크 사용 → 포트 매핑 필요하나 8081 포트 누락
monitor 서버에서 테스트
해결
docker-compose.prod.yml에 8081 포트 매핑 추가

특이 사항
리뷰 요구사항 (선택)
현재 Stage와 운영의 네트워크 모드가 다릅니다!
환경 일관성을 위해 Stage도 bridge + 포트 매핑 방식으로 통일하는 것이 좋을 것 같긴한데 인스턴스 사양이 너무 낮아서 일부로 그렇게 설정한 히스토리가 있는지 모르겠습니다..
영서님이 작업하셨어서 물어볼 수가 없네요.. 어떻게 생각하시나요?