Skip to content

Conversation

@jiminnimij
Copy link
Member

#️⃣ 연관된 이슈

관련된 이슈 번호를 적어주세요. 예: #이슈번호

#️⃣ 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요. (이미지 첨부 가능)

#️⃣ 테스트 결과

코드 변경에 대해 테스트를 수행한 결과를 요약해주세요. 예: 모든 테스트 통과 여부, 새로 작성한 테스트 케이스 등

#️⃣ 변경 사항 체크리스트

  • 코드에 영향이 있는 모든 부분에 대한 테스트를 작성하고 실행했나요?
  • 문서를 작성하거나 수정했나요? (필요한 경우)
  • 코드 컨벤션에 따라 코드를 작성했나요?
  • 본 PR에서 발생할 수 있는 모든 의존성 문제가 해결되었나요?

#️⃣ 스크린샷 (선택)

관련된 스크린샷이 있다면 여기에 첨부해주세요.

#️⃣ 리뷰 요구사항 (선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요.
예시: 이 부분의 코드가 잘 작동하는지 테스트해 주실 수 있나요?

📎 참고 자료 (선택)

관련 문서, 스크린샷, 또는 예시 등이 있다면 여기에 첨부해주세요

@jiminnimij jiminnimij self-assigned this Dec 31, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • 블루/그린 배포 설정: 백엔드 서비스의 블루/그린 배포를 지원하기 위해 Nginx 설정 및 Docker Compose 파일이 구현되었습니다.
  • 동적 Nginx 라우팅: Nginx는 이제 'service_url' 변수를 기반으로 'blue' 또는 'green' 백엔드 인스턴스로 요청을 동적으로 프록시하도록 구성되었습니다.
  • Spring 프로필 통합: Spring Boot 애플리케이션이 'blue' 및 'green' 프로필을 사용하도록 업데이트되어 각 배포 단계에 대한 환경별 구성을 허용합니다.
  • Docker 이미지 개선: Dockerfile이 더 나은 빌드 관행을 위해 업데이트되었으며 프로필 인자 전달을 지원합니다.
  • 보안 구성 업데이트: /env 엔드포인트가 Spring Security에서 허용되도록 추가되었으며, 이는 블루/그린 설정에서 상태 확인을 위한 것으로 보입니다.

🧠 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
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/cicdDeploy.yml
    • .github/workflows/gradle.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@jiminnimij jiminnimij merged commit fc74f70 into main Dec 31, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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"]
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

ENTRYPOINTspring.profiles.activeprod로 하드코딩되어 있어 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";
Copy link
Contributor

Choose a reason for hiding this comment

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

high

/env 경로의 return 지시어가 $service_url 변수의 값을 반환하는 대신 "service_url"이라는 문자열을 그대로 반환하고 있습니다. 현재 활성화된 서비스(blue/green)를 확인하려는 의도였다면, 변수 값을 반환하도록 수정해야 합니다.

	return 200 "$service_url";

Comment on lines +12 to +13
WORKDIR /app

Copy link
Contributor

Choose a reason for hiding this comment

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

medium

WORKDIR /app 명령어가 2번 라인에서 이미 선언되었습니다. 중복된 선언이므로 이 라인들과 이어지는 빈 줄은 삭제하는 것이 좋습니다. 코드 가독성과 유지보수성을 높일 수 있습니다.

Comment on lines +16 to +17
ARG PROFILES
ARG ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

ARG PROFILESARG ENV 빌드 인자가 선언되었지만 Dockerfile 내에서 사용되지 않고 있습니다. docker-compose 파일에서 environmentPROFILESENV를 설정하고 있으므로, 빌드 인자인 ARG는 혼동을 줄 수 있어 삭제하는 것이 좋습니다. 런타임에 필요한 값은 ENTRYPOINT에서 환경 변수로 처리하는 것이 올바른 접근입니다.

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