[setting] MOA-84 백엔드 서버 오라클 클라우드로 이전#546
Conversation
|
""" WalkthroughGitHub Actions 워크플로우에서 Google Cloud 관련 인증 및 배포 단계를 제거하고, Docker Hub를 통한 이미지 빌드 및 배포로 전환했습니다. 백엔드 코드에서는 Google Cloud Storage 및 Google Drive 관련 설정 클래스를 모두 주석 처리하여 비활성화했습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub Actions
participant Docker Hub
participant Oracle VM (via SSH)
Developer->>GitHub Actions: Push/PR 트리거
GitHub Actions->>Docker Hub: Docker 이미지 빌드 및 푸시 (multi-platform)
GitHub Actions->>Oracle VM (via SSH): SSH로 접속 후 배포 스크립트 실행
Oracle VM (via SSH)->>Docker Hub: Docker 이미지 pull
Oracle VM (via SSH)->>Oracle VM (via SSH): 컨테이너 실행 및 이미지 정리
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Test Results75 tests 75 ✅ 2s ⏱️ Results for commit 182e89f. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
backend/src/main/java/moadong/global/config/SecurityConfig.java (1)
3-8: Google Cloud 관련 import가 더 이상 사용되지 않습니다.
GoogleCredentials,Storage,StorageOptions등 모든 GCP 관련 import가 남아 있지만, 아래에서 Bean 정의가 주석 처리되면서 실제 사용처가 사라졌습니다. 빌드 시 unused-import 경고가 발생하므로 제거해주세요.-import com.google.auth.oauth2.GoogleCredentials; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions;
🧹 Nitpick comments (7)
backend/src/main/java/moadong/media/util/GoogleDriveConfig.java (1)
1-41: 주석으로만 남겨두기보다는 파일 자체를 삭제하거나 Git 기록에 맡기세요.전체 클래스가 주석 처리되어 실제로 컴파일·실행 타깃에서 전혀 쓰이지 않습니다. 주석으로 남겨두면 IDE 검색 결과에 불필요하게 노출되고 유지보수자가 혼란을 겪을 수 있으니,
① 해당 기능을 완전히 폐기할 예정이라면 파일을 삭제하고 Git 히스토리로 추적하거나,
② 장차 재활성화를 고려한다면@Profile,@ConditionalOnProperty등으로 토글 가능하게 구현하는 편이 낫습니다.
현재 상태는 코드베이스에 의미 없는 노이즈만 추가합니다.backend/src/main/java/moadong/global/config/SecurityConfig.java (1)
43-44: 주석 처리 대신 조건부 Bean 혹은 완전 제거를 고려하세요.
credentialsLocation필드와storage()Bean 메서드가 주석으로만 비활성화돼 있습니다.
장기적으로 GCP 스토리지를 쓰지 않는다면 코드를 삭제하고 의존성도build.gradle에서 제외해 빌드 크기를 줄이세요.
반대로 환경별로 토글해야 한다면@Profile("gcp")같은 조건부 빈으로 분리하는 것이 명시적입니다.
현재처럼 주석으로 남겨두면 코드베이스 일관성이 떨어집니다.Also applies to: 65-72
.github/workflows/oracle_server_cd_develop.yml (2)
55-55: 불필요한 공백 제거 필요55행 끝에 남은 트레일링 스페이스 때문에 YAMLlint 오류가 발생합니다. 빌드 실패를 막기 위해 공백을 삭제해주세요.
- +
67-75: 스텝 이름이 실제 동작과 어긋납니다.
Build and Push ARM64 Docker Image→ 현재는linux/arm64,linux/amd64두 플랫폼을 빌드합니다. 가독성을 위해 스텝 이름을 수정하세요..github/workflows/server_cd_release.yml (3)
55-55: 트레일링 스페이스 제거55행에 남아 있는 공백은 YAMLlint 오류를 유발합니다. 삭제해주세요.
63-75: 스텝 이름 수정 제안멀티플랫폼 이미지를 빌드하므로 스텝 이름을
Build and Push Docker Image (arm64+amd64)등으로 변경하면 한눈에 파악하기 쉽습니다.
86-103: 여러 줄에 트레일링 스페이스 및 EOF 개행 누락86-103행 다수와 파일 끝에 공백·개행 문제가 있어 YAMLlint 오류가 납니다. 스크립트 실행엔 영향 없지만 CI 품질을 위해 정리하세요.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/oracle_server_cd_develop.yml(3 hunks).github/workflows/server_cd_release.yml(3 hunks)backend/src/main/java/moadong/global/config/SecurityConfig.java(2 hunks)backend/src/main/java/moadong/media/util/GoogleDriveConfig.java(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/oracle_server_cd_develop.yml
57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/server_cd_release.yml
57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/oracle_server_cd_develop.yml
[error] 55-55: trailing spaces
(trailing-spaces)
.github/workflows/server_cd_release.yml
[error] 95-95: trailing spaces
(trailing-spaces)
[error] 97-97: trailing spaces
(trailing-spaces)
[error] 102-102: trailing spaces
(trailing-spaces)
[error] 103-103: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (2)
.github/workflows/oracle_server_cd_develop.yml (1)
32-38: Gradle 캐시 경로 확장 👍
~/.gradle/wrapper까지 포함해 캐시 효율이 좋아졌습니다. LGTM..github/workflows/server_cd_release.yml (1)
32-38: Gradle 캐시 경로 확장 👍릴리즈 워크플로에도 wrapper 캐시를 추가해 일관성이 확보되었습니다.
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| project_id: ${{ secrets.GCE_PROJECT }} | ||
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | ||
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} | ||
|
|
There was a problem hiding this comment.
docker/login-action 버전을 최신(v3)으로 올려야 합니다.
actionlint 경고: “the runner of docker/login-action@v2 action is too old”.
GH Actions 런타임과 호환성을 위해 v3로 업데이트하십시오.
- - name: Log in to Docker Hub
- uses: docker/login-action@v2
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v3📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| project_id: ${{ secrets.GCE_PROJECT }} | |
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | |
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | |
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} |
🧰 Tools
🪛 actionlint (1.7.7)
57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/oracle_server_cd_develop.yml around lines 56 to 61, update
the version of the docker/login-action from v2 to v3 to ensure compatibility
with the latest GitHub Actions runtime and resolve the actionlint warning.
Change the uses line to use docker/login-action@v3 instead of v2.
| - name: Log in to Docker Hub | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| credentials_json: ${{ secrets.GCE_SA_KEY }} | ||
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | ||
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} | ||
|
|
There was a problem hiding this comment.
docker/login-action v2 → v3 업그레이드 필요
develop 워크플로와 동일한 actionlint 오류가 발생합니다. 버전을 v3로 올려주세요.
- - name: Log in to Docker Hub
- uses: docker/login-action@v2
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v3📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| credentials_json: ${{ secrets.GCE_SA_KEY }} | |
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | |
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.SERVER_DOCKER_USERNAME }} | |
| password: ${{ secrets.SERVER_DOCKER_PASSWORD }} |
🧰 Tools
🪛 actionlint (1.7.7)
57-57: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/server_cd_release.yml around lines 56 to 61, the
docker/login-action is currently using version v2, which causes actionlint
errors similar to the develop workflow. Update the version from v2 to v3 in the
uses field to fix these errors and keep consistency with the develop workflow.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/server_cd_release.yml (1)
56-60:docker/login-action버전 미업그레이드 재발견이미 이전 리뷰에서 지적된 사항( v2 → v3 업그레이드)이 아직 반영되지 않았습니다.
actionlint오류가 그대로 남아 있으므로 반드시 v3 이상으로 올려주세요.
🧹 Nitpick comments (1)
.github/workflows/server_cd_release.yml (1)
96-104: 공백 문자 및 EOF 개행 누락YAMLlint 경고:
- 96, 98, 103 라인: 후행 공백
- 파일 끝 개행 없음
CI 안정성을 위해 불필요한 공백 제거 및 최종 개행 추가를 권장합니다.
- docker pull ${{ secrets.DOCKER_IMAGE_RELEASE }}:latest␠ + docker pull ${{ secrets.DOCKER_IMAGE_RELEASE }}:latest ... - docker image prune -af␠ + docker image prune -af +
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/server_cd_release.yml(4 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/server_cd_release.yml
58-58: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/server_cd_release.yml
[error] 96-96: trailing spaces
(trailing-spaces)
[error] 98-98: trailing spaces
(trailing-spaces)
[error] 103-103: trailing spaces
(trailing-spaces)
[error] 104-104: no new line character at the end of file
(new-line-at-end-of-file)
⏰ 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: Deploy
| uses: appleboy/ssh-action@master | ||
| with: | ||
| host: ${{ secrets.ORACLE_INSTANCE_RELEASE_IP }} | ||
| username: ${{ secrets.ORACLE_INSTANCE_USER }} | ||
| key: ${{ secrets.ORACLE_INSTANCE_RELEASE_PRIVATE_KEY }} | ||
| port: ${{ secrets.ORACLE_INSTANCE_RELEASE_PORT }} | ||
| script: | |
There was a problem hiding this comment.
🛠️ Refactor suggestion
appleboy/ssh-action@master → 고정된 커밋/태그로 핀 고정 권장
@master 레퍼런스는 예기치 않은 브레이킹 변경·공급망 공격 위험이 있습니다. 신뢰할 수 있는 릴리스 태그(예: v1.0.0)나 커밋 SHA로 고정하세요.
🤖 Prompt for AI Agents
In .github/workflows/server_cd_release.yml around lines 89 to 95, the usage of
appleboy/ssh-action@master should be replaced with a fixed commit SHA or a
specific release tag to avoid unexpected breaking changes or supply chain
attacks. Update the action reference from @master to a stable version like a
release tag (e.g., v1.0.0) or a commit SHA to ensure consistent and secure
workflow execution.
#️⃣연관된 이슈
📝작업 내용
Summary by CodeRabbit
Chores
Refactor