Skip to content

Conversation

@wibaek
Copy link
Member

@wibaek wibaek commented Apr 28, 2025

관련 이슈

작업 내용

  1. dev->local, stage->dev로 환경명을 변경했습니다
  2. 배포 방식을 develop 브랜치에 push하는것으로 dev환경(구stage)이 배포가 되게 변경했습니다.

특이 사항

리뷰 요구사항 (선택)

@wibaek wibaek self-assigned this Apr 28, 2025
@wibaek wibaek requested review from Copilot and removed request for Gyuhyeok99 and nayonsoso April 28, 2025 01:06
@coderabbitai
Copy link

coderabbitai bot commented Apr 28, 2025

Walkthrough

  1. .github/workflows/dev-cd.yml 변경

    • GitHub Actions 워크플로우 파일에서 배포 환경이 staging에서 development로 변경되었습니다.
    • 워크플로우 이름이 "[STAGE] Build Gradle and Deploy"에서 "[DEV] Build Gradle and Deploy"로 수정되었습니다.
    • 워크플로우 트리거 브랜치가 "release"에서 "develop"으로 변경되었습니다.
    • SSH 배포 단계에서 사용하는 Docker Compose 파일이 docker-compose.stage.yml에서 docker-compose.dev.yml로 바뀌었습니다.
    • 배포 대상 디렉터리는 동일하게 유지되고 있습니다.
  2. docker-compose.dev.yml 변경

    • 서비스 이름과 컨테이너 이름이 "solid-connection-stage"에서 "solid-connection-dev"로 변경되었습니다.
    • 환경 변수 SPRING_PROFILES_ACTIVE가 "stage"에서 "dev"로, ALLOY_ENV도 "stage"에서 "dev"로 각각 변경되었습니다.
    • 포트, 볼륨, 의존성 등 다른 설정은 변경되지 않았습니다.
  3. src/main/resources/logback-spring.xml 변경

    • 특정 로깅 설정이 적용되는 Spring 프로필이 "prod"와 "stage"에서 "prod"와 "dev"로 변경되었습니다.
    • 루트 로거의 레벨과 파일 출력 설정이 이제 "dev" 환경에도 적용됩니다.
    • 그 외의 로깅 설정은 변경되지 않았습니다.

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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@wibaek wibaek requested review from Gyuhyeok99 and nayonsoso April 28, 2025 01:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames environment configuration from stage to dev and updates the deployment process to trigger on the develop branch.

  • Renamed service and container naming in docker-compose file along with environment variables.
  • Updated GitHub Actions workflow to deploy from the develop branch and use the updated docker-compose file.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
docker-compose.dev.yml Changed service and container names and updated environment variables from stage to dev.
.github/workflows/dev-cd.yml Adjusted the workflow branch filter and source file for deployment.
Files not reviewed (1)
  • src/main/resources/logback-spring.xml: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/dev-cd.yml:63

  • The deployment target folder name still references 'stage', which may be inconsistent with the dev environment changes. Consider updating it to 'solid-connect-dev' for clarity.
target: "/home/${{ secrets.STAGE_USERNAME }}/solid-connect-stage/"

Copy link

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

🔭 Outside diff range comments (1)
.github/workflows/dev-cd.yml (1)

71-76: 🛠️ Refactor suggestion

8. 배포 실행 스크립트 파일 참조 오류
- SSH 실행 단계에서 docker-compose.stage.yml을 그대로 사용해 새로 복사한 docker-compose.dev.yml가 적용되지 않습니다.
- 아래와 같이 수정을 제안합니다:

- docker compose -f docker-compose.stage.yml up -d --build
+ docker compose -f docker-compose.dev.yml up -d --build
🧹 Nitpick comments (1)
src/main/resources/logback-spring.xml (1)

30-34: 1. 프로덕션 및 개발 로그 프로필 변경 적용
- <springProfile> 태그가 "prod,dev"로 올바르게 업데이트되었습니다.
- 로컬 개발 환경에서도 로그가 필요하다면 "local" 프로필을 추가하는 것을 검토해 보세요.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between daea588 and e650833.

📒 Files selected for processing (3)
  • .github/workflows/dev-cd.yml (2 hunks)
  • docker-compose.dev.yml (2 hunks)
  • src/main/resources/logback-spring.xml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (6)
docker-compose.dev.yml (2)

22-27: 2. 서비스 및 컨테이너 이름 업데이트
- 서비스 이름이 solid-connection-dev로, 컨테이너 이름이 solid-connection-dev로 적절히 변경되었습니다.
- 이전 solid-connection-stage 참조가 완전히 제거되었는지 확인 부탁드립니다.


30-31: 3. 환경 변수 ‘dev’ 모드 반영 확인
- SPRING_PROFILES_ACTIVE=devALLOY_ENV=dev로 수정되어 개발 환경이 제대로 반영되었습니다.
- 오타나 누락이 없는지 재검토해 주세요.

Also applies to: 45-46

.github/workflows/dev-cd.yml (4)

1-1: 4. 워크플로우 이름 명확화
- 워크플로우명이 "[DEV] Build Gradle and Deploy"로 업데이트되어 목적이 명확해졌습니다.


5-5: 5. 브랜치 트리거 환경 전환
- 배포 트리거 브랜치가 release에서 develop으로 올바르게 변경되었습니다.


62-62: 6. Docker Compose 파일 소스 경로 수정
- 복사 소스가 docker-compose.stage.yml에서 docker-compose.dev.yml로 업데이트되었습니다.


41-45: 7. 시크릿 및 타깃 디렉토리 네이밍 불일치
- 여전히 STAGE_HOST, STAGE_USERNAME, /solid-connect-stage/ 경로가 사용 중입니다.
- dev 환경 전용 시크릿(DEV_HOST, DEV_USERNAME)과 디렉토리(/solid-connect-dev/)로 변경을 검토해 주세요.

Copy link
Collaborator

@nayonsoso nayonsoso left a comment

Choose a reason for hiding this comment

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

  • ${{ secrets.STAGE_USERNAME }}
  • target: "/home/${{ secrets.STAGE_USERNAME }}/solid-connect-stage/"

이런 곳에 사용되는 용어도 이번에 한번에 바꾸는게 어떨까요?
혹시나 나중에 헷갈릴 수 있을 것 같아서요 😓

그리고 나중에 DNS의 도메인 이름도 바꾸실건지 궁금해요!
(바꾸신다면 프로메테우스 설정 변경도 잊지 말아주세요~)

username: ${{ secrets.STAGE_USERNAME }}
key: ${{ secrets.STAGE_PRIVATE_KEY }}
source: "./docker-compose.stage.yml"
source: "./docker-compose.dev.yml"
Copy link
Collaborator

@nayonsoso nayonsoso Apr 28, 2025

Choose a reason for hiding this comment

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

이 PR머지되기 전에 docker-compose 파일 이름이 바뀌어야 될 듯 합니다🧐

Copy link
Member Author

Choose a reason for hiding this comment

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

파일명도 변경을 해두긴 했는데, 머지와 동시에 바꿔지면 문제가 있나요?

Copy link
Member Author

Choose a reason for hiding this comment

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

아 workflow 파일에 도커파일 명시된것들이 다 바뀌지 않았었네요. 감사합니다

on:
push:
branches: [ "release" ]
branches: [ "develop" ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

이제 develop에 머지되면 CD가 돌아가겠네요 🥳

@wibaek
Copy link
Member Author

wibaek commented Apr 29, 2025

  • ${{ secrets.STAGE_USERNAME }}

    • target: "/home/${{ secrets.STAGE_USERNAME }}/solid-connect-stage/"

이런 곳에 사용되는 용어도 이번에 한번에 바꾸는게 어떨까요? 혹시나 나중에 헷갈릴 수 있을 것 같아서요 😓

그리고 나중에 DNS의 도메인 이름도 바꾸실건지 궁금해요! (바꾸신다면 프로메테우스 설정 변경도 잊지 말아주세요~)

환경변수도 바꿔두겠습니다!

폴더명도 생성해줘야해서 미루고 있었는데, 바꾸도록 하겠습니다

DNS 이름같은경우는 바꾸는데 좀 더 걸리기도 하고, 프론트엔드 uri도 일단은 stage로 되어있어서 유지할까 싶은데 어떠신가요?

Copy link
Collaborator

@nayonsoso nayonsoso left a comment

Choose a reason for hiding this comment

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

image

새로 폴더 만드신 것 확인했습니다 😊
DNS 도메인 이름은 나중에 바꿔도 괜찮을 것 같네요!

@wibaek wibaek merged commit 2ec3edf into solid-connection:develop Apr 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

환경 이름을 변경한다

3 participants