Skip to content

[chore][config-server] 배포 자동화 + 모니터링 설정 추가#13

Merged
rlaxxwls13 merged 6 commits into
devfrom
chore/12-ecr-workflow
May 17, 2026
Merged

[chore][config-server] 배포 자동화 + 모니터링 설정 추가#13
rlaxxwls13 merged 6 commits into
devfrom
chore/12-ecr-workflow

Conversation

@rlaxxwls13

@rlaxxwls13 rlaxxwls13 commented May 17, 2026

Copy link
Copy Markdown
Contributor

🌱 설명

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

config-server 의 배포 자동화 + 모니터링 설정을 추가합니다.

주요 변경

1. ECR 푸시 워크플로우 추가

  • main 브랜치 push 시 Docker 이미지 빌드 후 AWS ECR 푸시
  • 기존 CI 워크플로우와 통합

2. 모니터링 설정 추가

  • Spring Boot Actuator + Prometheus 의존성 추가

📌 관련 이슈

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

💻 커밋 유형

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

  • feat : 새로운 기능 추가
  • fix : 버그 수정 (긴급 핫픽스 포함)
  • refactor : 리팩토링
  • chore : 빌드 설정, 의존성 업데이트 등
  • docs : 문서 수정
  • comment : 주석 추가 및 변경
  • rename : 파일 / 폴더 이동 또는 이름 변경
  • remove : 파일 삭제
  • test : 테스트 코드 추가 / 수정

📝 체크리스트

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

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

📚 추가 설명

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

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

Summary by CodeRabbit

Release Notes

  • New Features

    • Prometheus 모니터링 메트릭 수집 기능 추가
  • Chores

    • CI/CD 파이프라인 업데이트 (자동 빌드 및 Docker 배포)
    • 프로덕션 환경 서비스 디스커버리 구성 개선
    • 관리 엔드포인트 활성화

Review Change Stack

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

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 94c7b631-78c7-4064-b566-8e9b8c8fb22c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/12-ecr-workflow

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 17, 2026
@rlaxxwls13 rlaxxwls13 added the 🔧 chore 기타 수정 label May 17, 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)
build.gradle (1)

35-35: ⚡ Quick win

spring-boot-starter-actuator 중복 선언 제거 권장

Line 26에 이미 동일 의존성이 있어 Line 35는 중복입니다. 중복 선언은 이후 의존성 관리 시 혼선을 만들 수 있으니 하나만 남겨주세요.

제안 패치
 dependencies {
     // Spring Boot
     implementation 'org.springframework.boot:spring-boot-starter-actuator'
     implementation 'org.springframework.boot:spring-boot-starter-security'
 	implementation 'org.springframework.boot:spring-boot-starter-web'
@@
     // 모니터링
-    implementation 'org.springframework.boot:spring-boot-starter-actuator'
     implementation 'io.micrometer:micrometer-registry-prometheus'
🤖 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 `@build.gradle` at line 35, build.gradle에
'org.springframework.boot:spring-boot-starter-actuator' 의존성이 중복 선언되어 있으므로 중복된 한
줄을 제거해 주세요; 구체적으로 프로젝트에서 이미 선언된
'org.springframework.boot:spring-boot-starter-actuator' 항목(라인 26에서 발견된 선언)을 유지하고
파일 내 추가된 동일 좌표의 선언('org.springframework.boot:spring-boot-starter-actuator'로 표기된
항목, 현재 라인 35)만 삭제하면 됩니다.
.github/workflows/deploy.yml (2)

61-73: ⚡ Quick win

push-to-ecr job에 setup-gradle 단계가 누락되었습니다.

build-and-test job에서는 gradle/actions/setup-gradle@v6을 사용하여 Gradle 캐싱 및 최적화를 적용하지만, push-to-ecr job에서는 이 단계가 없습니다. 이로 인해 빌드 시간이 길어지고 캐싱 혜택을 받지 못합니다.

♻️ setup-gradle 단계 추가 제안
       - uses: actions/setup-java@v5
         with:
           java-version: '21'
           distribution: 'temurin'

+      - name: Set up Gradle
+        uses: gradle/actions/setup-gradle@v6
+
       - name: Grant execute permission for gradlew
         run: chmod +x ./gradlew
🤖 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/deploy.yml around lines 61 - 73, The push-to-ecr job is
missing the Gradle setup step used in build-and-test, which prevents Gradle
caching and slows builds; add a step that uses gradle/actions/setup-gradle@v6
(same configuration used in build-and-test) into the push-to-ecr job before
running ./gradlew so it benefits from the same dependency/cache configuration
and optimizations — reference the push-to-ecr job name and the setup-gradle
action to locate where to insert the step.

85-94: 💤 Low value

Docker 빌드 캐싱 추가를 고려하세요.

현재 Docker 빌드는 캐싱 없이 매번 전체 빌드를 수행합니다. docker/build-push-action과 GitHub Actions 캐시를 활용하면 빌드 시간을 단축할 수 있습니다.

♻️ Docker 빌드 캐싱 적용 예시
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Build and push to ECR
        uses: docker/build-push-action@v6
        with:
          context: .
          platforms: linux/amd64
          push: true
          tags: |
            ${{ steps.ecr-login.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}
            ${{ steps.ecr-login.outputs.registry }}/${{ env.ECR_REPOSITORY }}:latest
          cache-from: type=gha
          cache-to: type=gha,mode=max
🤖 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/deploy.yml around lines 85 - 94, Replace the current
"Build, tag, and push image to ECR" run block with a Buildx + build-push-action
flow: add a step using docker/setup-buildx-action@v3, then replace the manual
docker build/push with docker/build-push-action@v6 configured to use context .,
platforms linux/amd64, push=true and the same tags referencing REGISTRY,
ECR_REPOSITORY and IMAGE_TAG (github.sha); enable caching by setting cache-from:
type=gha and cache-to: type=gha,mode=max so GitHub Actions will reuse layer
cache and speed up subsequent builds.
🤖 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 `@src/main/resources/application-prod.yml`:
- Line 9: The current YAML entry that removes the pattern "- 172\." is too
broad; replace that pattern with a regex constrained to RFC1918 172.16.0.0/12
(i.e. only 172.16–172.31). Locate the list element containing "172\." (the "-
172\." entry) and change it to the narrowed regular expression matching
172.(16-31) — for example using the pattern that matches
"172.(1[6-9]|2[0-9]|3[0-1])." so only the private 172.16/12 addresses are
allowed.

---

Nitpick comments:
In @.github/workflows/deploy.yml:
- Around line 61-73: The push-to-ecr job is missing the Gradle setup step used
in build-and-test, which prevents Gradle caching and slows builds; add a step
that uses gradle/actions/setup-gradle@v6 (same configuration used in
build-and-test) into the push-to-ecr job before running ./gradlew so it benefits
from the same dependency/cache configuration and optimizations — reference the
push-to-ecr job name and the setup-gradle action to locate where to insert the
step.
- Around line 85-94: Replace the current "Build, tag, and push image to ECR" run
block with a Buildx + build-push-action flow: add a step using
docker/setup-buildx-action@v3, then replace the manual docker build/push with
docker/build-push-action@v6 configured to use context ., platforms linux/amd64,
push=true and the same tags referencing REGISTRY, ECR_REPOSITORY and IMAGE_TAG
(github.sha); enable caching by setting cache-from: type=gha and cache-to:
type=gha,mode=max so GitHub Actions will reuse layer cache and speed up
subsequent builds.

In `@build.gradle`:
- Line 35: build.gradle에 'org.springframework.boot:spring-boot-starter-actuator'
의존성이 중복 선언되어 있으므로 중복된 한 줄을 제거해 주세요; 구체적으로 프로젝트에서 이미 선언된
'org.springframework.boot:spring-boot-starter-actuator' 항목(라인 26에서 발견된 선언)을 유지하고
파일 내 추가된 동일 좌표의 선언('org.springframework.boot:spring-boot-starter-actuator'로 표기된
항목, 현재 라인 35)만 삭제하면 됩니다.
🪄 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: 1228cc07-dbc2-46c6-8162-96909415cd5e

📥 Commits

Reviewing files that changed from the base of the PR and between 6e90568 and 27041fc.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • .github/workflows/deploy.yml
  • build.gradle
  • src/main/resources/application-prod.yml
  • src/main/resources/application.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.yml

Comment thread src/main/resources/application-prod.yml
@rlaxxwls13 rlaxxwls13 merged commit fd3d8c8 into dev May 17, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in First Ticket May 17, 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] ECR 이미지 자동 빌드/푸시 워크플로우 구축

2 participants