-
Notifications
You must be signed in to change notification settings - Fork 0
merge to main #85
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
merge to main #85
Conversation
…' into feature/SCRUM-66-bluegreenDeploy
…nDeploy [Feature] SCRUM-66 블루/그린 배포 (#64)
Summary of ChangesHello @jiminnimij, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 백엔드 애플리케이션을 위한 포괄적인 블루/그린 배포 전략을 도입합니다. 여기에는 동적 트래픽 라우팅을 위한 Nginx 구성, 'blue' 및 'green' 백엔드 인스턴스 관리를 위한 새로운 Docker Compose 파일, 그리고 이러한 배포 프로필을 지원하기 위한 Spring Boot 애플리케이션 구성 업데이트를 포함한 인프라 설정에 대한 중요한 변경 사항이 포함됩니다. 목표는 새로운 버전이 검증된 후에만 트래픽이 전환되도록 하여, 이전 버전과 함께 새로운 버전의 애플리케이션을 배포함으로써 원활하고 무중단 배포를 가능하게 하는 것입니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
이 PR은 블루/그린 무중단 배포를 위한 구성을 추가하는 것을 목표로 하고 있습니다. Docker, Nginx, docker-compose 파일들이 블루/그린 환경을 지원하도록 수정되었습니다. 전반적으로 좋은 방향이지만, 몇 가지 중요한 수정이 필요해 보입니다.
주요 피드백:
Dockerfile에서 중복된WORKDIR선언이 있고, 빌드 인자(ARG)가 컨테iner 실행 시점에 사용되지 않아 프로필이 고정되는 문제가 있습니다. 이로 인해 블루/그린 배포가 의도대로 동작하지 않을 수 있습니다.nginx설정에서 현재 활성화된 서비스를 확인하는/env엔드포인트가 변수 값 대신 문자열을 그대로 반환하는 버그가 있습니다.
이러한 점들을 수정하면 더 안정적인 무중단 배포 환경을 구축할 수 있을 것입니다. 자세한 내용은 각 파일에 대한 개별 코멘트를 참고해주세요.
| COPY ${JAR_FILE} app.jar | ||
| ENTRYPOINT ["java","-jar","-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=prod","/app.jar"] | ||
|
|
||
| ENTRYPOINT ["java","-jar","-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=prod","/app/app.jar"] |
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.
ENTRYPOINT에 spring.profiles.active가 prod로 하드코딩되어 있어 docker-compose에서 설정한 blue 또는 green 프로필이 적용되지 않습니다. 이로 인해 블루/그린 배포가 의도대로 동작하지 않습니다.
docker-compose에서 설정한 PROFILES 환경 변수를 사용하도록 ENTRYPOINT를 수정해야 합니다. exec 형식은 쉘 변수 치환을 지원하지 않으므로, /bin/sh -c를 통해 쉘에서 환경 변수를 읽어와 실행하도록 변경해야 합니다.
ENTRYPOINT ["/bin/sh", "-c", "java -jar -Duser.timezone=Asia/Seoul -Dspring.profiles.active=${PROFILES} /app/app.jar"]
| ## try_files $uri $uri/ =404; | ||
| location = /env { | ||
| default_type text/plain; | ||
| return 200 "service_url"; |
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.
| WORKDIR /app | ||
|
|
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.
| ARG PROFILES | ||
| ARG ENV |
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.
#️⃣ 연관된 이슈
#️⃣ 작업 내용
#️⃣ 테스트 결과
#️⃣ 변경 사항 체크리스트
#️⃣ 스크린샷 (선택)
#️⃣ 리뷰 요구사항 (선택)
📎 참고 자료 (선택)