Skip to content

Conversation

@dolong2
Copy link
Owner

@dolong2 dolong2 commented Dec 17, 2025

κ°œμš”

  • 이미지 λΉŒλ“œ κ³Όμ •μ—μ„œ npm install및 buildλ₯Ό μ§„ν–‰ν•˜λŠ” λŒ€μ‹  λΉŒλ“œλœ νŒŒμΌμ„ 올릴 수 μžˆλ„λ‘ λ¦¬νŽ™ν† λ§ν•©λ‹ˆλ‹€.

μž‘μ—…λ‚΄μš©

  • nest μ• ν”Œλ¦¬μΌ€μ΄μ…˜ λ„μ»€νŒŒμΌμ—μ„œ npm install, npm run buildλ₯Ό μˆ˜ν–‰ν•˜μ§€ μ•Šλ„λ‘ λ¦¬νŽ™ν† λ§
  • nest μ• ν”Œλ¦¬μΌ€μ΄μ…˜ λΉŒλ“œμ‹œ npm run buildλ₯Ό μˆ˜ν–‰ν•˜λ„λ‘ λ¦¬νŽ™ν† λ§

체크리슀트

νƒ¬ν”Œλ¦Ώμ™Έμ— ν•„μš”ν•œ ν•­λͺ©μ΄ 있으면 μΆ”κ°€ν•΄μ£Όμ„Έμš”.

  • λ‘œμ»¬μ—μ„œ λΉŒλ“œκ°€ μ„±κ³΅ν•˜λ‚˜μš”?
  • μΆ”κ°€(μˆ˜μ •)ν•œ μ½”λ“œκ°€ μ •μƒμ μœΌλ‘œ λ™μž‘ν•˜λ‚˜μš”?
  • pr 타켓 λΈŒλžœμΉ˜κ°€ 맞게 μ„€μ •λ˜μ–΄ μžˆλ‚˜μš”?
  • prμ—μ„œ μž‘μ—…ν•  λ‚΄μš©λ§Œ μž‘μ—…λλ‚˜μš”?
  • κΈ°μ‘΄ API와 ν˜Έν™˜λ˜μ§€ μ•ŠλŠ” 사항이 μžˆλ‚˜μš”?

Summary by CodeRabbit

릴리슀 λ…ΈνŠΈ

  • Chores
    • NestJS μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ Docker 이미지 λΉŒλ“œ ν”„λ‘œμ„ΈμŠ€λ₯Ό μ΅œμ ν™”ν–ˆμŠ΅λ‹ˆλ‹€.
    • NestJS μœ ν˜•μ— λŒ€ν•΄ 이미지 생성 μ „ λ³„λ„μ˜ λΉŒλ“œ 단계λ₯Ό μΆ”κ°€ν•΄ 사전 λΉŒλ“œλœ μ•„ν‹°νŒ©νŠΈλ₯Ό νŒ¨ν‚€μ§•ν•˜λ„λ‘ λ³€κ²½ν–ˆμŠ΅λ‹ˆλ‹€.
    • μ»¨ν…Œμ΄λ„ˆ μ‹œμž‘ 방식을 ν”„λ‘œλ•μ…˜μ— 맞게 κ°„μ†Œν™”ν•˜κ³  배포 νš¨μœ¨μ„ κ°œμ„ ν–ˆμŠ΅λ‹ˆλ‹€.

✏️ Tip: You can customize this high-level summary in your review settings.

@dolong2 dolong2 self-assigned this Dec 17, 2025
@dolong2 dolong2 added 1️⃣ Priority: 상 μš°μ„ μˆœμœ„ 상 πŸ”¨ Refactor μ½”λ“œ λ¦¬νŒ©ν† λ§ labels Dec 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Walkthrough

NestJS용 Dockerfile ν…œν”Œλ¦Ώμ„ 개발 νλ¦„μ—μ„œ ν”„λ‘œλ•μ…˜ μ€‘μ‹¬μ˜ 미리 λΉŒλ“œλœ μ•„ν‹°νŒ©νŠΈ λ°©μ‹μœΌλ‘œ λ³€κ²½ν•˜κ³ , 이미지 λΉŒλ“œ μ„œλΉ„μŠ€μ— ApplicationType.NEST_JS λΆ„κΈ°λ₯Ό μΆ”κ°€ν•΄ Docker λΉŒλ“œ 전에 npm run buildλ₯Ό μ‹€ν–‰ν•˜λ„λ‘ μ œμ–΄ 흐름을 μˆ˜μ •ν•¨.

Changes

Cohort / File(s) Change Summary
NestJS Dockerfile ν…œν”Œλ¦Ώ μ΅œμ ν™”
src/main/kotlin/com/dcd/server/core/common/file/FileContent.kt
Dockerfile ν…œν”Œλ¦Ώμ„ 개발용 전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€ 볡사/λΉŒλ“œμ—μ„œ, package*.jsonκ³Ό dist만 λ³΅μ‚¬ν•˜κ³  npm ci --production=true둜 μ„€μΉ˜ν•œ λ’€ λΉŒλ“œλœ distλ₯Ό μ‹€ν–‰ν•˜λ„λ‘(μ‹œκ³„μ—΄ TZ μ„€μ • 포함) λ³€κ²½.
NestJS λΉŒλ“œ 단계 μΆ”κ°€
src/main/kotlin/com/dcd/server/core/domain/application/service/impl/BuildDockerImageServiceImpl.kt
ApplicationType.NEST_JS λΆ„κΈ° μΆ”κ°€. Docker 이미지 λΉŒλ“œ 전에 ν”„λ‘œμ νŠΈμ— λŒ€ν•΄ npm run buildλ₯Ό μ‹€ν–‰ν•˜λ„λ‘ μ œμ–΄ 흐름을 ν™•μž₯함. κΈ°μ‘΄ SPRING_BOOT κ²½λ‘œλŠ” λ³€κ²½ μ—†μŒ.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • FileContent.kt: Dockerfile λ¬Έμžμ—΄ λ³€κ²½(볡사 λŒ€μƒ, μ„€μΉ˜ λͺ…λ Ή, CMD) μ •ν™•μ„± 검증 ν•„μš”(경둜·파일λͺ…Β·ν¬νŠΈ λ“±).
  • BuildDockerImageServiceImpl.kt: λΉŒλ“œ λͺ…λ Ή μ‹€ν–‰ μ‹œ μž‘μ—… 디렉터리, ν™˜κ²½(예: Node 버전, package script 쑴재) 및 μ‹€νŒ¨ μ‹œ 처리 흐름 확인 ν•„μš”.

Possibly related PRs

Suggested labels

:sparkles: Feature

Poem

🐰 λ¨Όμ € 땅을 νŒŒμ„œ λΉŒλ“œν–ˆμ§€,
κ°€λ²Όμš΄ κ°€λ°©μ—” 였직 package와 dist만,
μ„œμšΈ μ‹œκ°„μ— 맞좰 ν•œκ±ΈμŒ λ›΄λ‹€,
이미지 μž‘κ³  λ§ˆμŒμ€ κ°€λ³κ²Œ,
λ‚˜λŠ” λ‹Ήκ·Ό λŒ€μ‹  배포 둜그λ₯Ό μ”ΉλŠ”λ‹€ πŸ₯•βœ¨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (2 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed PR 제λͺ©μ΄ μ£Όμš” 변경사항인 NestJS μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ Docker 파일 λ‚΄μš© μˆ˜μ •μ„ μ •ν™•ν•˜κ²Œ λ°˜μ˜ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.
✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refac/nest-application-docker-file

πŸ“œ Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 0a2bb8a and 50b3ed6.

πŸ“’ Files selected for processing (1)
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/BuildDockerImageServiceImpl.kt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/BuildDockerImageServiceImpl.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Test

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/kotlin/com/dcd/server/core/domain/application/service/impl/BuildDockerImageServiceImpl.kt (1)

46-66: buildImageByApplicationId λ©”μ„œλ“œμ—λ„ NEST_JS λΆ„κΈ° μΆ”κ°€λ₯Ό κ³ λ €ν•˜μ„Έμš”.

buildImageByApplication λ©”μ„œλ“œμ—λŠ” NEST_JS λΆ„κΈ°κ°€ μΆ”κ°€λ˜μ—ˆμ§€λ§Œ, buildImageByApplicationId λ©”μ„œλ“œ(lines 26-39)μ—λŠ” NEST_JS λΆ„κΈ°κ°€ μ—†μŠ΅λ‹ˆλ‹€. 두 λ©”μ„œλ“œ κ°„ 일관성을 μœ„ν•΄ buildImageByApplicationId에도 λ™μΌν•œ λ‘œμ§μ„ μΆ”κ°€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

buildImageByApplicationId λ©”μ„œλ“œμ—λ„ λ‹€μŒκ³Ό 같이 NEST_JS λΆ„κΈ°λ₯Ό μΆ”κ°€ν•˜μ„Έμš”:

val exitValue = when (application.applicationType) {
    ApplicationType.SPRING_BOOT -> {
        commandPort.executeShellCommand("cd ./$directoryName && ./gradlew clean build")
            .run {
                if (this == 0)
                    commandPort.executeShellCommand("cd ./$directoryName && docker build -t ${application.containerName}:latest .")
                else this
            }
    }
    ApplicationType.NEST_JS -> {
        commandPort.executeShellCommand("cd ./$directoryName && npm run build")
            .run {
                if (this == 0)
                    commandPort.executeShellCommand("cd ./$directoryName && docker build -t ${application.containerName}:latest .")
                else this
            }
    }
    else -> {
        commandPort.executeShellCommand("cd ./$directoryName && docker build -t ${application.containerName}:latest .")
    }
}
🧹 Nitpick comments (1)
src/main/kotlin/com/dcd/server/core/common/file/FileContent.kt (1)

45-45: νƒ€μž„μ‘΄ ν•˜λ“œμ½”λ”© 확인 ν•„μš”

CMDμ—μ„œ νƒ€μž„μ‘΄μ΄ Asia/Seoul둜 ν•˜λ“œμ½”λ”©λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. ν”„λ‘œμ νŠΈ μš”κ΅¬μ‚¬ν•­μ— 따라 μ˜λ„λœ 것일 수 μžˆμœΌλ‚˜, ν™˜κ²½ λ³€μˆ˜λ‘œ μ„€μ •ν•˜λŠ” 것이 더 μœ μ—°ν•œ λ°©μ‹μž…λ‹ˆλ‹€.

ν™˜κ²½ λ³€μˆ˜λ‘œ κ΄€λ¦¬ν•˜λ €λ©΄ λ‹€μŒκ³Ό 같이 μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€:

-    CMD ["sh", "-c", "TZ=Asia/Seoul node dist/main.js"]
+    ENV TZ=Asia/Seoul
+    CMD ["node", "dist/main.js"]

λ˜λŠ” νƒ€μž„μ‘΄μ„ env νŒŒλΌλ―Έν„°λ‘œ 전달받아 ${getEnvString(env)}에 ν¬ν•¨μ‹œν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€.

πŸ“œ Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between ad6d95f and 0a2bb8a.

πŸ“’ Files selected for processing (2)
  • src/main/kotlin/com/dcd/server/core/common/file/FileContent.kt (1 hunks)
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/BuildDockerImageServiceImpl.kt (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
πŸ““ Common learnings
Learnt from: dolong2
Repo: dolong2/dcd PR: 703
File: src/main/kotlin/com/dcd/server/core/domain/volume/model/Volume.kt:1-12
Timestamp: 2025-09-01T14:52:42.625Z
Learning: dolong2 prefers to implement validation logic (such as path validation for Volume.physicalPath) in the business logic layer rather than in domain model init blocks, keeping domain models as simple data containers.
Learnt from: dolong2
Repo: dolong2/dcd PR: 703
File: src/test/resources/data.sql:28-30
Timestamp: 2025-09-01T14:57:07.656Z
Learning: dolong2 prefers to implement deletion validation in business logic rather than using database CASCADE constraints. For volume deletion, they want to validate if any mounts exist before allowing deletion, preventing accidental data loss while maintaining explicit control over the deletion process.
Learnt from: dolong2
Repo: dolong2/dcd PR: 655
File: src/main/kotlin/com/dcd/server/persistence/workspace/entity/WorkspaceJpaEntity.kt:12-14
Timestamp: 2025-07-12T14:05:23.333Z
Learning: dolong2λŠ” JPA의 GeneratedValue(strategy = GenerationType.UUID) λŒ€μ‹  μƒμ„±μžμ—μ„œ UUID.randomUUID()둜 직접 μ΄ˆκΈ°ν™”ν•˜λŠ” 방식을 μ„ ν˜Έν•œλ‹€. 더 κ°„λ‹¨ν•˜κ³  예츑 κ°€λŠ₯ν•œ λ™μž‘μ„ μœ„ν•΄μ„œλ‹€.
Learnt from: dolong2
Repo: dolong2/dcd PR: 659
File: src/main/kotlin/com/dcd/server/core/domain/domain/usecase/ConnectDomainUseCase.kt:40-41
Timestamp: 2025-07-14T15:01:47.531Z
Learning: dolong2λŠ” κΈ°λŠ₯적으둜 λ¬Έμ œκ°€ μ—†λŠ” μ½”λ“œ κ°œμ„ μ‚¬ν•­μ˜ 경우, μ‹€μ œλ‘œ ν•„μš”ν•  λ•ŒκΉŒμ§€ μˆ˜μ •μ„ λ―Έλ£¨λŠ” μ‹€μš©μ μΈ 접근법을 μ„ ν˜Έν•œλ‹€. 예λ₯Ό λ“€μ–΄ 의미둠적 정확성을 μœ„ν•œ 변경은 ν•΄λ‹Ή κΈ°λŠ₯이 μ‹€μ œλ‘œ ν•„μš”ν•  λ•Œ μˆ˜μ •ν•˜λŠ” 방식을 νƒν•œλ‹€.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Test

@dolong2 dolong2 merged commit b8c5f04 into develop Dec 17, 2025
2 checks passed
@dolong2 dolong2 deleted the refac/nest-application-docker-file branch December 17, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ”¨ Refactor μ½”λ“œ λ¦¬νŒ©ν† λ§ 1️⃣ Priority: 상 μš°μ„ μˆœμœ„ 상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nest μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 도컀 파일 λ‚΄μš© μˆ˜μ •

2 participants