Skip to content

[chore][config-server] Docker 환경 + CI 워크플로우 추가#9

Merged
rlaxxwls13 merged 4 commits into
devfrom
chore/8-docker-ci
May 7, 2026
Merged

[chore][config-server] Docker 환경 + CI 워크플로우 추가#9
rlaxxwls13 merged 4 commits into
devfrom
chore/8-docker-ci

Conversation

@rlaxxwls13

@rlaxxwls13 rlaxxwls13 commented May 7, 2026

Copy link
Copy Markdown
Contributor

🌱 설명

이 PR에서 어떤 작업을 했는지 간략하게 설명해주세요.

config-server 의 Docker 빌드 / 실행 환경과 GitHub Actions CI 워크플로우를 추가합니다.

📌 관련 이슈

이 PR과 연관된 이슈 번호를 작성해주세요. (이슈 없으면 생략 가능)

close #8

💻 커밋 유형

해당하는 항목에 x를 채워주세요.

  • chore : 빌드 설정, 의존성 업데이트 등

📝 체크리스트

PR 올리기 전에 아래 항목을 확인해주세요.

  • develop 브랜치 기준으로 feature 브랜치를 생성했나요?
  • 코드 컨벤션 및 스타일 가이드를 준수했나요?
  • 관련 이슈와 연결했나요?
  • 설명이 필요한 부분 / 어려운 부분 / 공유가 필요한 부분에 주석을 추가했습니다.
  • 제가 작성한 코드를 스스로 리뷰했습니다.
  • 기존 테스트와 충돌하지 않음을 확인했나요?

📚 추가 설명

리뷰어가 참고해야 할 내용, 첨부 이미지 등이 있다면 자유롭게 추가해주세요. (선택)

  • 예) 라이브러리 버전을 올리면서 설정 방식이 변경되었습니다.

Summary by CodeRabbit

릴리스 노트

  • 신규 기능

    • 애플리케이션 상태 모니터링 엔드포인트 추가
  • 개선 사항

    • Docker 컨테이너 기반 배포 지원 구성
    • CI/CD 파이프라인 설정
    • 자동화된 빌드 및 테스트 워크플로우 추가
    • Docker Compose를 통한 개발 환경 구성 지원

@rlaxxwls13 rlaxxwls13 linked an issue May 7, 2026 that may be closed by this pull request
3 tasks
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@rlaxxwls13 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 47 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: first-ticket/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c076aec-f686-4d7e-a8c0-aefece4472da

📥 Commits

Reviewing files that changed from the base of the PR and between 6efb568 and 4176bdb.

📒 Files selected for processing (3)
  • Dockerfile
  • src/test/java/com/firstticket/configserver/ConfigServerApplicationTests.java
  • src/test/resources/application-test.yml
📝 Walkthrough

Walkthrough

설정 서버의 컨테이너화를 위한 인프라 구성이 추가되었습니다. Dockerfile, docker-compose.yml, GitHub Actions CI 워크플로우가 신규 추가되고, Spring Boot Actuator 의존성이 추가되며, gradlew.bat 스크립트가 포맷팅 업데이트됩니다.

Changes

컨테이너 및 CI 인프라 구성

Layer / File(s) Summary
건강 상태 확인 의존성
build.gradle
Spring Boot Actuator 스타터 의존성이 추가되어 /actuator/health 엔드포인트를 활성화합니다.
멀티스테이지 빌드 이미지
Dockerfile
Stage 1에서 Gradle 빌드 캐싱 최적화를 거쳐 부트 JAR을 생성하고, 레이어 추출 도구로 분리합니다. Stage 2에서는 JRE 기반 런타임 이미지에 계층화된 JAR을 복사하고 비루트 사용자(spring)로 실행하도록 구성합니다.
로컬 컨테이너 실행 환경
docker-compose.yml
config-server 서비스를 정의하며, 스프링 프로필, 자격증명, Eureka URL, JVM 옵션을 환경 변수로 구성하고, /actuator/health 엔드포인트 기반 헬스체크를 추가합니다.
자동화된 CI 파이프라인
.github/workflows/ci.yml
PR 및 push 이벤트 시 main, dev 브랜치에서 JDK 21 기반 빌드와 테스트를 실행하고, 실패 시 테스트 리포트를 아티팩트로 업로드합니다.
빌드 스크립트 정리
gradlew.bat
배치 스크립트의 주석 포맷팅과 라인 엔딩이 정규화되며, 실행 로직은 변경되지 않습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경 사항인 Docker 환경과 CI 워크플로우 추가를 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경 사항들이 이슈 #8의 모든 주요 목표를 충족합니다: Dockerfile 작성, docker-compose.yml 작성, CI 워크플로우 구축이 포함되어 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 이슈 #8의 범위 내에 있으며, Docker 환경 구성과 CI 워크플로우 추가의 명확한 목표와 관련이 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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/8-docker-ci

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.

❤️ Share

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

@rlaxxwls13 rlaxxwls13 self-assigned this May 7, 2026
@rlaxxwls13 rlaxxwls13 added the 🔧 chore 기타 수정 label May 7, 2026

@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: 1

🧹 Nitpick comments (3)
.github/workflows/ci.yml (1)

30-30: ⚡ Quick win

gradle/actions/setup-gradle 버전을 최신으로 업그레이드하는 것을 권장합니다.

공식 README는 현재 gradle/actions/setup-gradle@v6 사용을 권장합니다. v3는 두 메이저 버전 뒤처진 상태입니다. 다만, v6부터는 Gradle User Home 저장/복원 기능이 독점 라이선스(gradle-actions-caching) 하의 클로즈드 소스 라이브러리로 분리되었으나, 공개 저장소는 무료로 제공됩니다. 오픈 소스(MIT) 방식을 선호한다면 cache-provider: basic 옵션을 함께 사용할 수 있습니다.

♻️ 수정 제안
-        uses: gradle/actions/setup-gradle@v3
+        uses: gradle/actions/setup-gradle@v6
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 30, Update the GitHub Actions step that
currently references "uses: gradle/actions/setup-gradle@v3" to the latest
recommended release "gradle/actions/setup-gradle@v6"; if you want to keep an
open-source cache implementation, add the option "cache-provider: basic" to the
same step so the caching behavior stays MIT-friendly while benefiting from v6
improvements and fixes.
docker-compose.yml (1)

1-1: 💤 Low value

version 필드는 Docker Compose V2에서 더 이상 사용하지 않습니다.

version: "3.9"는 이미 무시되며, 공식적으로 deprecated 처리되어 docker compose(V2) 실행 시 경고가 발생합니다. 현대 Compose 파일은 services: 바로 시작합니다.

♻️ 수정 제안
-version: '3.9'
-
 services:
   config-server:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.yml` at line 1, Remove the deprecated top-level "version:
'3.9'" key from the Compose file and ensure the manifest begins with the
"services:" section (i.e., delete the "version" line and move/verify that
service definitions start at the top-level under the "services" key); no other
semantic changes are needed—keep existing service definitions intact.
Dockerfile (1)

16-16: ⚡ Quick win

|| true로 의존성 캐시 빌드 오류를 은폐하지 말고 dependencies 태스크를 사용하세요.

bootJar -x test || true 패턴은 네트워크 오류, 손상된 Gradle Wrapper 등 실제 빌드 실패도 무시합니다. 의존성 사전 다운로드 목적에는 dependencies 태스크가 적합합니다. 소스 파일 없이도 실행 가능하며 || true가 불필요합니다.

♻️ 수정 제안
-# 의존성만 먼저 다운로드 (소스 변경 시에도 이 레이어는 캐시됨)
-RUN ./gradlew bootJar -x test --no-daemon || true
+# 의존성만 먼저 다운로드 (소스 변경 시에도 이 레이어는 캐시됨)
+RUN ./gradlew dependencies --no-daemon
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 16, The Dockerfile currently masks build failures by
running "./gradlew bootJar -x test --no-daemon || true"; replace this with a
non-failing dependency prefetch using the Gradle "dependencies" (or
"resolveDependencies" if you have a custom task) task so failures surface during
image build and you don't need "|| true"; update the RUN step to invoke
"./gradlew dependencies --no-daemon" (or the project-specific dependency-resolve
task) instead of "bootJar -x test --no-daemon || true" so dependency download
runs without compiling sources and build errors are not silenced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 30: The RUN instruction that installs curl should suppress recommended
packages to keep the image minimal; update the Dockerfile RUN line that
currently runs apt-get install -y curl (the RUN command shown in the diff) to
include the --no-install-recommends flag so apt-get installs only required
packages while still removing /var/lib/apt/lists/* as before.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Line 30: Update the GitHub Actions step that currently references "uses:
gradle/actions/setup-gradle@v3" to the latest recommended release
"gradle/actions/setup-gradle@v6"; if you want to keep an open-source cache
implementation, add the option "cache-provider: basic" to the same step so the
caching behavior stays MIT-friendly while benefiting from v6 improvements and
fixes.

In `@docker-compose.yml`:
- Line 1: Remove the deprecated top-level "version: '3.9'" key from the Compose
file and ensure the manifest begins with the "services:" section (i.e., delete
the "version" line and move/verify that service definitions start at the
top-level under the "services" key); no other semantic changes are needed—keep
existing service definitions intact.

In `@Dockerfile`:
- Line 16: The Dockerfile currently masks build failures by running "./gradlew
bootJar -x test --no-daemon || true"; replace this with a non-failing dependency
prefetch using the Gradle "dependencies" (or "resolveDependencies" if you have a
custom task) task so failures surface during image build and you don't need "||
true"; update the RUN step to invoke "./gradlew dependencies --no-daemon" (or
the project-specific dependency-resolve task) instead of "bootJar -x test
--no-daemon || true" so dependency download runs without compiling sources and
build errors are not silenced.
🪄 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: Repository: first-ticket/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: aedf54fe-98b8-4872-bc4c-eed090b66c1c

📥 Commits

Reviewing files that changed from the base of the PR and between 611f66d and 6efb568.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • Dockerfile
  • build.gradle
  • docker-compose.yml
  • gradlew.bat

Comment thread Dockerfile Outdated
rlaxxwls13 added 2 commits May 7, 2026 11:13
불필요한 추천 패키지 설치 억제로 이미지 크기 최소화

Related to #8

@sweetRainShin sweetRainShin 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.

확인했습니다!

@rlaxxwls13 rlaxxwls13 merged commit e9efc3c into dev May 7, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in First Ticket May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 chore 기타 수정

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[chore][config-server] 컨테이너 빌드 및 로컬 실행 환경 구성

2 participants