Skip to content

hotfix - docker 관련 수정 - #112

Merged
roode1017 merged 1 commit into
devfrom
hotfix/#111
Aug 20, 2025
Merged

hotfix - docker 관련 수정#112
roode1017 merged 1 commit into
devfrom
hotfix/#111

Conversation

@roode1017

@roode1017 roode1017 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • 배포 워크플로우 개선: main에 push/수동 실행, 백엔드 빌드·업로드 단순화, .env 직접 업로드, EC2에서 Docker/Compose 자동 설치 및 구동, up -d --build로 재배포 및 이미지 정리.
    • 사용자 영향: 더 빠른 배포, 안정성 향상, 다운타임 감소.
  • Refactor
    • Dockerfile을 단일 런타임 단계로 단순화하고 사전 빌드된 JAR 사용(Healthcheck 제거).
    • docker-compose에서 서비스 빌드 시 Dockerfile 명시로 일관성 강화.

@roode1017 roode1017 self-assigned this Aug 20, 2025
@roode1017 roode1017 added the bug Something isn't working label Aug 20, 2025
@roode1017 roode1017 linked an issue Aug 20, 2025 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Aug 20, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

배포 파이프라인을 로컬 빌드 업로드 방식으로 전환하고, EC2 원격에서 Docker/Compose 설치 확인 후 docker-compose up -d --build로 배포하도록 변경. Dockerfile은 런타임 단일 스테이지로 단순화되고, Compose는 명시적 Dockerfile 경로를 지정. .env는 직접 업로드.

Changes

Cohort / File(s) Change Summary
CI 배포 워크플로우
.github/workflows/deploy.yml
main에 대한 pull_request 트리거 제거; Java 17 설정 후 backendProject에서 Gradle 빌드(-x test); 생성 JAR을 backendProject/app.jar로 복사; app.jar, Dockerfile, docker-compose-prod.yml, .env 업로드; EC2에서 Docker/Compose 설치 확인 및 docker-compose up -d --build 수행; 이미지 정리 유지.
Docker 런타임 이미지
backendProject/Dockerfile
멀티스테이지(Gradle 빌더) 제거; 사전 빌드된 app.jar를 COPY; HEALTHCHECK 제거; ENTRYPOINT와 포트 노출 유지.
Compose 설정
docker-compose-prod.yml
api1, api2의 build에 dockerfile: Dockerfile 명시 추가; 기타 설정 불변.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant EC2 as EC2 Host
  participant DK as Docker/Compose

  rect rgb(245,248,255)
  note over GH: 로컬 빌드 및 업로드
  GH->>GH: Set up JDK (Temurin 17)
  GH->>GH: Gradle build (backendProject, -x test)
  GH->>GH: Rename to backendProject/app.jar
  GH->>EC2: Upload app.jar, Dockerfile, docker-compose-prod.yml, .env
  end

  rect rgb(243,255,247)
  note over EC2,Dk: 원격 배포 준비
  EC2->>EC2: Install/enable/start Docker (dnf/yum)
  EC2->>EC2: Ensure docker group for ec2-user
  EC2->>EC2: Install docker-compose if missing
  end

  rect rgb(255,250,240)
  note over EC2,Dk: 배포 실행
  EC2->>DK: docker-compose up -d --build
  DK-->>EC2: Services started (api1, api2)
  EC2->>DK: docker image prune -f
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45–75 minutes

Possibly related issues

Possibly related PRs

Poem

작은 발로 톡톡, CI를 두드려요 🐇
빚은 JAR 한 알, 가방에 쏙 넣고
구름 집(EC2) 문앞에 살짝 내려놓고
도커가 하품하며 깨어나죠—up -d
두 마리 api, 딩동! 준비 완료
밤하늘엔 로그가 별처럼 반짝 ✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 411becc and 239570a.

📒 Files selected for processing (3)
  • .github/workflows/deploy.yml (2 hunks)
  • backendProject/Dockerfile (1 hunks)
  • docker-compose-prod.yml (2 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/#111

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@roode1017
roode1017 merged commit afd9d88 into dev Aug 20, 2025
1 check was pending
@roode1017
roode1017 deleted the hotfix/#111 branch August 20, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

또 deploy docker 수정

1 participant