Skip to content

feat: docker setting - #4

Merged
Sehi55 merged 1 commit into
devfrom
chore/3-docker-setting
Apr 27, 2026
Merged

Sehi55 merged 1 commit into
devfrom
chore/3-docker-setting

Conversation

@Sehi55

@Sehi55 Sehi55 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

📝 작업 내용

이번 PR에서 작업한 내용을 설명해주세요.

  • 도커 설정

🚀 주요 변경 사항

완료한 이슈 번호
Close #3
관련된 이슈 번호 (닫고 싶지 않은 경우)
Related to #

✅ 자체 체크리스트 (필수)

  • Dockerfile 추가
  • application-docker.yml 추가

📸 테스트 인증샷

빌드 결과 및 Postman 실행 화면을 여기에 첨부해 주세요.

💬 리뷰어 전달사항 (선택)

특별히 봐주었으면 하는 부분이나 논의가 필요한 점을 적어주세요.

  • 논의점


📎 참고 자료

관련 문서, 레퍼런스 링크 등이 있다면 여기에 첨부해주세요.

Summary by CodeRabbit

Release Notes

  • Chores
    • Docker 컨테이너 배포를 위한 멀티 스테이지 빌드 지원 추가
    • 프로젝트 이름을 'gateway'에서 'api-gateway'로 변경
    • Docker 환경용 마이크로서비스 디스커버리(Eureka) 구성 추가
    • 설정 파일 형식 정리

@Sehi55 Sehi55 self-assigned this Apr 27, 2026
@Sehi55 Sehi55 added the documentation Improvements or additions to documentation label Apr 27, 2026
@Sehi55 Sehi55 linked an issue Apr 27, 2026 that may be closed by this pull request
2 tasks
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown
📝 Walkthrough

개요

다단계 Dockerfile을 추가하여 Gradle을 통해 Spring Boot JAR을 빌드하고, Docker 환경을 위한 Eureka 클라이언트 구성을 정의합니다. 프로젝트명을 'gateway'에서 'api-gateway'로 변경하고 구성 파일을 정리합니다.

변경사항

조직 / 파일 요약
Docker 인프라 구성
Dockerfile
JDK 기반 빌더 스테이지에서 ./gradlew bootJar --no-daemon로 Spring Boot 실행 가능 JAR을 빌드하고, JRE 기반 런타임 이미지에 복사하여 포트 19000에서 애플리케이션을 실행합니다.
프로젝트 설정
settings.gradle
루트 Gradle 프로젝트명을 'gateway'에서 'api-gateway'로 변경합니다.
환경별 구성
src/main/resources/application-docker.yml, src/main/resources/application-local.yml
Docker 환경용 Eureka 서버 URL(http://eureka-server:8761/eureka/)을 추가하고 application-local.yml의 불필요한 빈 줄을 제거합니다.

예상 코드 리뷰 시간

🎯 1 (사소함) | ⏱️ ~5분

🐰✨ 도커 설정으로 구름 위에 띄워,
JAR을 담아 런타임 날려,
유레카와 손잡고 춤을 춰,
포트 19000에서 반짝반짝,
마이크로서비스의 꿈을 펼쳐! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes a minor out-of-scope change: updating rootProject.name in settings.gradle from 'gateway' to 'api-gateway', which is not listed in issue #3 objectives. Either document the settings.gradle change as part of the PR scope or revert it to keep changes focused on Docker configuration only.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: docker setting' clearly relates to the main changes in the PR, which add Docker configuration (Dockerfile and application-docker.yml).
Linked Issues check ✅ Passed The PR successfully implements both coding requirements from issue #3: adds a functional Dockerfile for multi-stage build and adds application-docker.yml with Eureka client configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/3-docker-setting

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Dockerfile`:
- Around line 12-19: The runtime Dockerfile runs as root because there is no
USER set; create a non-root runtime user and switch to it by adding a user/group
(e.g., "appuser"), ensure the /app directory and the copied app.jar are owned by
that user (or use --chown during COPY from builder or run chown /app), then add
a USER appuser directive before ENTRYPOINT so java -jar /app/app.jar runs with
least privilege; keep the existing FROM, WORKDIR, COPY and ENTRYPOINT lines but
update ownership and add the USER declaration.
- Line 19: The Dockerfile currently only sets ENTRYPOINT ["java", "-jar",
"/app/app.jar"] which doesn't activate the docker Spring profile; update the
Dockerfile to set the docker profile either by adding an environment variable
SPRING_PROFILES_ACTIVE=docker (ENV SPRING_PROFILES_ACTIVE=docker) or by
appending the JVM system property to the ENTRYPOINT (e.g., add
-Dspring.profiles.active=docker to the java command) so application-docker.yml
(Eureka config) is loaded inside the container.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9738af95-7ce8-4b97-a95b-ef1dec734121

📥 Commits

Reviewing files that changed from the base of the PR and between 08401ba and 3933fba.

📒 Files selected for processing (4)
  • Dockerfile
  • settings.gradle
  • src/main/resources/application-docker.yml
  • src/main/resources/application-local.yml
💤 Files with no reviewable changes (1)
  • src/main/resources/application-local.yml

Comment thread Dockerfile
Comment thread Dockerfile

@qldo qldo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

확인하였습니다

@ji-circle ji-circle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

확인했습니다!

@Sehi55
Sehi55 merged commit 3094136 into dev Apr 27, 2026
4 checks passed
@Sehi55
Sehi55 deleted the chore/3-docker-setting branch April 27, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] 도커 설정

3 participants