Skip to content

Conversation

ImGdevel
Copy link
Member

@ImGdevel ImGdevel commented Sep 12, 2025

Summary by CodeRabbit

  • New Features

    • 환경 변수 템플릿과 배포 스크립트(리눅스/윈도우) 추가로 로컬·프로덕션 배포를 간소화
    • 프로덕션용 컨테이너 구성과 헬스체크 개선으로 서비스 안정성 강화
  • Documentation

    • 배포 가이드와 GitHub Secrets 설정 문서 추가
    • README에 자동·수동 배포 절차 및 예시 명령어 추가
  • Chores

    • 개발/릴리스 CI/CD 워크플로우 도입(빌드·테스트·이미지 푸시·자동 배포)
    • 라인 엔딩 규칙 정비 및 무시 규칙 개선
    • Docker 헬스체크 방식 및 구성 최적화
  • Tests

    • 대화 기록 페이지네이션 및 토큰 기반 잔액 검증 시나리오로 테스트 보강

Copy link
Contributor

coderabbitai bot commented Sep 12, 2025

Warning

Rate limit exceeded

@ImGdevel has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between a80e5c9 and 2cb8122.

📒 Files selected for processing (5)
  • .github/workflows/develop.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • deploy/DEPLOYMENT.md (1 hunks)
  • deploy/deploy.sh (1 hunks)
  • deploy/docker-compose.prod.yml (1 hunks)

Walkthrough

리포지토리에 배포/운영 구성과 스クリپ트, CI/CD 워크플로, Docker Compose 설정, 환경 변수 템플릿, 테스트 코드(페이징/토큰 용어/검증 흐름) 업데이트가 추가되거나 수정되었다. 솔루션에서 docker-compose 프로젝트가 제거되었고, 컨테이너 헬스체크와 라인엔딩 규칙, .gitignore 패턴 등이 조정되었다.

Changes

Cohort / File(s) Summary
환경/리포지토리 템플릿
/.env.example, /.gitattributes, /.gitignore
환경 변수 예시 추가(DB/Redis/JWT/OAuth2/외부 서비스/리소스 제한). EOL 규칙 및 실행 권장 속성 정의. ignore 패턴 정비(docker-compose 예외, 바이너리/ini 포괄).
Docker/Compose 런타임
/ProjectVG.Api/Dockerfile, /docker-compose.yml, /docker-compose.db.yml, /deploy/docker-compose.prod.yml
헬스체크 curl→wget, start-period 60s→30s. 애플리케이션/프로덕션/DB 전용 Compose 스택 추가(네트워크/볼륨/리소스/헬스체크/환경 변수 연결).
배포 스크립트(리눅스/윈도우)
/deploy/deploy.sh, /scripts/deploy.ps1
GHCR 이미지 기반 배포 자동화, 사전검증, 컨테이너 교체, 다단계 헬스체크(/health), 로그 출력, 에러 처리. Windows용 배포 파이프라인 및 base64 시크릿 디코드 지원.
DB/마이그레이션 유틸리티
/scripts/migrate.ps1, /scripts/reset-db-full.ps1, /scripts/reset-migration.ps1, /scripts/update-db-schema.ps1
인터랙티브 마이그레이션 생성/적용, 전체 리셋(컨테이너/볼륨/네트워크), 초기화 마이그레이션 재생성, 데이터 보존형 스키마 업데이트. 컬러 메시지와 상세 가이드 포함.
CI/CD 워크플로
.github/workflows/develop.yml, .github/workflows/release.yml
develop 브랜치 PR CI(복원/빌드/테스트/커버리지/리포트). release 브랜치 푸시 시 빌드·푸시(GHCR) 및 셀프호스트 러너 배포(시크릿 디코드→deploy.sh 실행).
테스트 업데이트
/ProjectVG.Tests/Application/Integration/ConversationServiceIntegrationTests.cs, /ProjectVG.Tests/Application/TestUtilities/TestDataBuilder.cs, /ProjectVG.Tests/Auth/TokenServiceTests.cs, /ProjectVG.Tests/Services/Chat/Validator/ChatRequestValidatorTests.cs
대화 이력 페이징(offset/limit) 반영, 캐릭터 생성에 userId 추가, 리프레시 토큰 만료 시뮬레이션, 검증 로직을 토큰 용어로 전환 및 예외/흐름 기대치 조정.
문서
/README.md, /deploy/DEPLOYMENT.md, /docs/github-secrets-setup.md
배포 가이드(자동/수동), 스크립트 사용법, 시크릿 설정 안내 추가.
솔루션 정리
/ProjectVG.sln
docker-compose 프로젝트 항목 및 관련 구성 제거.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as 클라이언트
  participant API as API 서버
  participant Svc as ConversationService
  participant Repo as ConversationRepository

  User->>API: GET /conversations/{characterId}?offset&limit
  API->>Svc: GetConversationHistoryAsync(userId, characterId, offset, limit)
  Svc->>Repo: FetchMessages(userId, characterId, offset, limit)
  Repo-->>Svc: Messages[]
  Svc-->>API: Messages[]
  API-->>User: 200 OK (페이지된 이력)
  note over API,Svc: 페이징 파라미터 전파(기본값 지원)
Loading
sequenceDiagram
  autonumber
  actor Dev as 개발자
  participant GH as GitHub
  participant CI as Build/Test (ubuntu)
  participant REG as GHCR
  participant Runner as Deploy Runner
  participant Host as Prod Host

  Dev->>GH: push to release
  GH->>CI: Release 워크플로 트리거
  CI->>CI: dotnet restore/build/test
  CI->>REG: Docker build & push :latest
  CI-->>GH: 상태 보고
  GH->>Runner: Deploy 잡 트리거
  Runner->>REG: docker login/pull
  Runner->>Host: decode .env / docker-compose.yml
  Runner->>Host: ./deploy/deploy.sh
  Host->>Host: docker-compose up -d + 헬스체크
  Host-->>Runner: 배포 결과
  Runner-->>GH: 성공/실패 보고
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

당근을 씹으며 배포 스위치 톡, 톡!
토큰 셈하며 채팅 줄을 척, 척!
컨테이너 숨을 고르고 /health에 콕, 콕!
스크립트는 춤추고 워크플로는 똑, 똑!
밤하늘에 깃발 올린다—VG가 쏙, 쏙! 🥕🚀

Pre-merge checks and finishing touches and finishing touches and finishing touches and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 현재 PR 제목 "Crone : ci cd pipline"은 변경사항의 주요 의도인 CI/CD 파이프라인 및 배포 자동화와 관련이 있어 내용과 연관은 있으나 철자 오류("Crone", "pipline")와 형식(불필요한 콜론·소문자 혼용)으로 가독성과 전문성이 떨어집니다.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch crone/ci-cd-pipline

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.

@ImGdevel ImGdevel force-pushed the crone/ci-cd-pipline branch 2 times, most recently from 4941457 to 97be437 Compare September 12, 2025 23:44
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: 7

🧹 Nitpick comments (16)
.gitattributes (4)

15-19: *중복된 .sh 규칙 제거 및 주석 정정 제안

.gitattributes로 실행 권한을 설정할 수 없습니다. 현재 주석은 오해의 소지가 있고, *.sh 규칙이 중복됩니다. 아래처럼 주석을 명확히 하고 중복/불필요 항목을 정리하는 편이 좋습니다.

-# Ensure that shell scripts are executable
-*.sh text eol=lf
-deploy.sh text eol=lf
-deploy-dev.sh text eol=lf
+# Shell scripts: LF
+# NOTE: 실행 권한은 .gitattributes로 설정되지 않습니다.
+#   필요한 경우 다음 명령으로 권한을 부여하고 커밋하세요:
+#   git update-index --chmod=+x <file>

24-26: Dockerfile 변형명 매칭 보강

Dockerfile.dev, Dockerfile.prod 같은 관례적 네이밍을 추가로 커버하세요. 현재 *.dockerfileDockerfile.dev를 매칭하지 않습니다.

 Dockerfile text eol=lf
+Dockerfile.* text eol=lf
 *.dockerfile text eol=lf
 docker-compose*.yml text eol=lf

21-21: PowerShell 파생 파일도 포함

PowerShell 모듈/데이터 파일(.psm1, .psd1)도 CRLF로 고정하는 것이 일관성에 도움 됩니다.

 *.ps1 text eol=crlf
+*.psm1 text eol=crlf
+*.psd1 text eol=crlf

32-32: 파일 말미 개행(Newline at EOF) 추가 권장

일부 도구가 최종 개행을 요구합니다. 마지막 줄에 개행을 추가해 주세요.

 *.json text eol=lf
+
.env.example (3)

6-8: DB 호스트 지침 추가 제안

개발/로컬은 host.docker.internal이 편리하지만, prod Compose(동일 호스트 내 네트워크)에서는 Server=projectvg-db 사용이 일반적입니다. 주석으로 환경별 권장 값을 안내해 혼선을 줄이세요.


7-7: dotenv-linter 경고(인용부호) 처리

ValueWithoutQuotes 경고 해소가 필요하다면 값을 따옴표로 감쌀 수 있습니다. Docker Compose는 .env의 따옴표를 제거해 주입하므로 안전합니다.

-DB_CONNECTION_STRING=Server=host.docker.internal,1433;Database=ProjectVG;User Id=sa;Password=YOUR_DB_PASSWORD;TrustServerCertificate=true;MultipleActiveResultSets=true
+DB_CONNECTION_STRING="Server=host.docker.internal,1433;Database=ProjectVG;User Id=sa;Password=YOUR_DB_PASSWORD;TrustServerCertificate=true;MultipleActiveResultSets=true"

39-39: 파일 끝 개행 추가

POSIX 스타일 및 린터 정합성을 위해 EOF 개행을 추가하세요.

.github/workflows/develop.yml (3)

20-21: steps 들여쓰기 및 트레일링 스페이스 정리

YAMLlint 경고가 다수 발생합니다. 기능에는 영향 없으나 린팅 실패를 막기 위해 트레일링 스페이스 제거, EOF 개행 추가, 들여쓰기(라인 20 경고)만 정리하세요.


54-69: TRX 업로드/보존 추가 제안

dorny/test-reporter 사용은 적절합니다. 필요 시 원본 TRX를 아티팩트로 업로드하면 추적성이 좋아집니다.

     - name: Publish Test Results
       uses: dorny/test-reporter@v1
       if: success() || failure()
       with:
         name: Test Results
         path: coverage/*.trx
         reporter: dotnet-trx
+
+    - name: Upload TRX Artifacts
+      if: always()
+      uses: actions/upload-artifact@v4
+      with:
+        name: trx-results
+        path: coverage/*.trx

14-17: 동시 실행 취소로 러너 낭비 방지

PR 업데이트가 잦다면 이전 실행 자동 취소를 권장합니다.

 jobs:
   build-and-test:
     name: Build & Test
     runs-on: ubuntu-latest
+    concurrency:
+      group: develop-${{ github.ref }}
+      cancel-in-progress: true
docker-compose.yml (3)

5-7: 미사용 외부 네트워크 정의 제거 또는 사용 여부 명시

external-db-network가 어떤 서비스에도 연결되지 않습니다. 제거하거나 서비스에 연결해 목적을 명확히 하세요.

-  external-db-network:
-    external: true
-    name: projectvg-external-db

23-41: 환경변수 주입 방식 간소화 제안

변수가 많으므로 env_file를 병행하면 유지보수가 쉬워집니다. 현 방식도 동작하므로 선택사항입니다.

-    environment:
-      - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
-      - LLM_BASE_URL=${LLM_BASE_URL}
-      - MEMORY_BASE_URL=${MEMORY_BASE_URL}
-      - TTS_BASE_URL=${TTS_BASE_URL}
-      - TTS_API_KEY=${TTS_API_KEY}
-      - DB_CONNECTION_STRING=${DB_CONNECTION_STRING}
-      - REDIS_CONNECTION_STRING=${REDIS_CONNECTION_STRING}
-      - JWT_SECRET_KEY=${JWT_SECRET_KEY}
-      - JWT_ACCESS_TOKEN_LIFETIME_MINUTES=${JWT_ACCESS_TOKEN_LIFETIME_MINUTES}
-      - JWT_REFRESH_TOKEN_LIFETIME_DAYS=${JWT_REFRESH_TOKEN_LIFETIME_DAYS}
-      - OAUTH2_ENABLED=${OAUTH2_ENABLED}
-      - GOOGLE_OAUTH_ENABLED=${GOOGLE_OAUTH_ENABLED}
-      - GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
-      - GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
-      - GOOGLE_OAUTH_REDIRECT_URI=${GOOGLE_OAUTH_REDIRECT_URI}
-      - GOOGLE_OAUTH_AUTO_CREATE_USER=${GOOGLE_OAUTH_AUTO_CREATE_USER}
-      - GOOGLE_OAUTH_DEFAULT_ROLE=${GOOGLE_OAUTH_DEFAULT_ROLE}
+    env_file:
+      - .env
+    environment:
+      ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}

18-22: 리소스 제한 값 유형 고정화(선택)

cpus/mem_limit/memswap_limit는 수치형으로 두는 편이 도구 호환성에 유리합니다. 큰 문제는 아니므로 선택입니다.

-    cpus: '${API_CPU_LIMIT:-1.0}'
-    mem_limit: ${API_MEMORY_LIMIT:-1g}
-    memswap_limit: ${API_MEMORY_LIMIT:-1g}
+    cpus: ${API_CPU_LIMIT:-1.0}
+    mem_limit: ${API_MEMORY_LIMIT:-1g}
+    memswap_limit: ${API_MEMORY_LIMIT:-1g}
deploy/DEPLOYMENT.md (1)

117-119: Bare URL → Markdown 링크

markdownlint 경고(MD034) 제거를 위해 링크로 감싸세요.

-- **API**: http://localhost:7910
-- **헬스체크**: http://localhost:7910/health
-- **Swagger**: http://localhost:7910/swagger (개발 환경)
+- **API**: <http://localhost:7910>
+- **헬스체크**: <http://localhost:7910/health>
+- **Swagger**: <http://localhost:7910/swagger> (개발 환경)
deploy/docker-compose.prod.yml (1)

71-79: EOF 개행 추가

뉴라인이 없어 린터 경고가 납니다. 개행을 추가하세요.

.github/workflows/release.yml (1)

1-121: 트레일링 스페이스/EOF 개행

여러 라인의 트레일링 스페이스와 EOF 개행 누락으로 린터 경고가 납니다. 정리 권장.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c7f13d and a80e5c9.

📒 Files selected for processing (14)
  • .env.example (1 hunks)
  • .gitattributes (1 hunks)
  • .github/workflows/develop.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .gitignore (2 hunks)
  • ProjectVG.Api/Dockerfile (1 hunks)
  • ProjectVG.sln (0 hunks)
  • README.md (1 hunks)
  • deploy/DEPLOYMENT.md (1 hunks)
  • deploy/deploy.sh (1 hunks)
  • deploy/docker-compose.prod.yml (1 hunks)
  • docker-compose.db.yml (1 hunks)
  • docker-compose.yml (1 hunks)
  • scripts/deploy.ps1 (1 hunks)
💤 Files with no reviewable changes (1)
  • ProjectVG.sln
🚧 Files skipped from review as they are similar to previous changes (6)
  • ProjectVG.Api/Dockerfile
  • README.md
  • .gitignore
  • deploy/deploy.sh
  • docker-compose.db.yml
  • scripts/deploy.ps1
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/release.yml

87-87: label "deploy-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🪛 YAMLlint (1.37.1)
.github/workflows/release.yml

[error] 19-19: trailing spaces

(trailing-spaces)


[error] 24-24: trailing spaces

(trailing-spaces)


[warning] 26-26: wrong indentation: expected 6 but found 4

(indentation)


[error] 28-28: trailing spaces

(trailing-spaces)


[error] 33-33: trailing spaces

(trailing-spaces)


[error] 41-41: trailing spaces

(trailing-spaces)


[error] 47-47: trailing spaces

(trailing-spaces)


[error] 53-53: trailing spaces

(trailing-spaces)


[error] 59-59: trailing spaces

(trailing-spaces)


[error] 66-66: trailing spaces

(trailing-spaces)


[error] 71-71: trailing spaces

(trailing-spaces)


[error] 77-77: trailing spaces

(trailing-spaces)


[error] 88-88: trailing spaces

(trailing-spaces)


[warning] 90-90: wrong indentation: expected 6 but found 4

(indentation)


[error] 92-92: trailing spaces

(trailing-spaces)


[error] 95-95: trailing spaces

(trailing-spaces)


[error] 100-100: trailing spaces

(trailing-spaces)


[error] 103-103: trailing spaces

(trailing-spaces)


[error] 106-106: trailing spaces

(trailing-spaces)


[error] 110-110: trailing spaces

(trailing-spaces)


[error] 116-116: trailing spaces

(trailing-spaces)


[error] 121-121: no new line character at the end of file

(new-line-at-end-of-file)

.github/workflows/develop.yml

[error] 13-13: trailing spaces

(trailing-spaces)


[error] 18-18: trailing spaces

(trailing-spaces)


[warning] 20-20: wrong indentation: expected 6 but found 4

(indentation)


[error] 22-22: trailing spaces

(trailing-spaces)


[error] 27-27: trailing spaces

(trailing-spaces)


[error] 35-35: trailing spaces

(trailing-spaces)


[error] 44-44: trailing spaces

(trailing-spaces)


[error] 53-53: trailing spaces

(trailing-spaces)


[error] 62-62: trailing spaces

(trailing-spaces)


[error] 70-70: trailing spaces

(trailing-spaces)


[error] 80-80: no new line character at the end of file

(new-line-at-end-of-file)

deploy/docker-compose.prod.yml

[error] 79-79: no new line character at the end of file

(new-line-at-end-of-file)

🪛 dotenv-linter (3.3.0)
.env.example

[warning] 7-7: [ValueWithoutQuotes] This value needs to be surrounded in quotes

(ValueWithoutQuotes)


[warning] 17-17: [UnorderedKey] The TTS_API_KEY key should go before the TTS_BASE_URL key

(UnorderedKey)


[warning] 21-21: [UnorderedKey] The JWT_ACCESS_TOKEN_LIFETIME_MINUTES key should go before the JWT_SECRET_KEY key

(UnorderedKey)


[warning] 22-22: [UnorderedKey] The JWT_REFRESH_TOKEN_LIFETIME_DAYS key should go before the JWT_SECRET_KEY key

(UnorderedKey)


[warning] 26-26: [UnorderedKey] The GOOGLE_OAUTH_ENABLED key should go before the OAUTH2_ENABLED key

(UnorderedKey)


[warning] 27-27: [UnorderedKey] The GOOGLE_OAUTH_CLIENT_ID key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)


[warning] 28-28: [UnorderedKey] The GOOGLE_OAUTH_CLIENT_SECRET key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)


[warning] 29-29: [UnorderedKey] The GOOGLE_OAUTH_REDIRECT_URI key should go before the OAUTH2_ENABLED key

(UnorderedKey)


[warning] 30-30: [UnorderedKey] The GOOGLE_OAUTH_AUTO_CREATE_USER key should go before the GOOGLE_OAUTH_CLIENT_ID key

(UnorderedKey)


[warning] 31-31: [UnorderedKey] The GOOGLE_OAUTH_DEFAULT_ROLE key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)


[warning] 39-39: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

🪛 markdownlint-cli2 (0.17.2)
deploy/DEPLOYMENT.md

117-117: Bare URL used

(MD034, no-bare-urls)


118-118: Bare URL used

(MD034, no-bare-urls)


119-119: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (4)
.gitattributes (1)

1-32: 확인 결과: .editorconfig · GitHub Actions 워크플로우 없음

레포지토리에 .editorconfig 파일과 .github/workflows 디렉터리가 없어 .gitattributes의 .sln/.csproj CRLF 강제와의 충돌 여부를 내부에서 검증할 수 없습니다.

  • 추가 확인 필요: 리포지토리·조직 차원의 다른 CI 설정 또는 에디터 정책(예: azure-pipelines.yml, .gitlab-ci.yml, .circleci/config.yml, 중앙 .editorconfig 등)이 있는지 확인하십시오.
deploy/docker-compose.prod.yml (1)

46-51: MSSQL 헬스체크 도구 존재 여부 확인 필요

기본 이미지에 /opt/mssql-tools/bin/sqlcmd가 없을 수 있습니다. 도구 설치를 보장하거나 단순 TCP 체크로 대체하세요.

가능한 대안:

  • 도구 설치를 보장: mssql-tools 또는 mssql-tools18 포함 이미지 사용
  • 간이 체크:
healthcheck:
  test: ["CMD-SHELL", "timeout 5 bash -c '</dev/tcp/localhost/1433' || exit 1"]
.github/workflows/release.yml (2)

87-87: 러너 라벨 확인 필요

custom 라벨 deploy-runner가 실제 self-hosted 러너에 등록되어 있는지 확인하세요. 미등록 시 잡이 스케줄되지 않습니다.


96-105: 디코딩 경로와 문서 간 불일치 가능성

워크플로는 deploy/docker-compose.yml로 디코딩하지만 문서는 docker-compose.prod.yml을 안내합니다. deploy.sh가 어떤 경로를 읽는지 확인해 경로를 일치시키세요.

Comment on lines +24 to +31
# OAuth2 Configuration
OAUTH2_ENABLED=true
GOOGLE_OAUTH_ENABLED=true
GOOGLE_OAUTH_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_OAUTH_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
GOOGLE_OAUTH_REDIRECT_URI=http://localhost:7900/auth/oauth2/callback
GOOGLE_OAUTH_AUTO_CREATE_USER=true
GOOGLE_OAUTH_DEFAULT_ROLE=User
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

OAuth Redirect URI 포트 불일치로 콜백 실패 가능

docker-compose.yml은 호스트 7910→컨테이너 7900으로 포워딩합니다. 현재 GOOGLE_OAUTH_REDIRECT_URI는 7900을 가리켜 로컬 실행 시 OAuth 콜백이 실패할 수 있습니다. 7910으로 맞춰주세요.

-GOOGLE_OAUTH_REDIRECT_URI=http://localhost:7900/auth/oauth2/callback
+GOOGLE_OAUTH_REDIRECT_URI=http://localhost:7910/auth/oauth2/callback
📝 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.

Suggested change
# OAuth2 Configuration
OAUTH2_ENABLED=true
GOOGLE_OAUTH_ENABLED=true
GOOGLE_OAUTH_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_OAUTH_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
GOOGLE_OAUTH_REDIRECT_URI=http://localhost:7900/auth/oauth2/callback
GOOGLE_OAUTH_AUTO_CREATE_USER=true
GOOGLE_OAUTH_DEFAULT_ROLE=User
# OAuth2 Configuration
OAUTH2_ENABLED=true
GOOGLE_OAUTH_ENABLED=true
GOOGLE_OAUTH_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID
GOOGLE_OAUTH_CLIENT_SECRET=YOUR_GOOGLE_CLIENT_SECRET
GOOGLE_OAUTH_REDIRECT_URI=http://localhost:7910/auth/oauth2/callback
GOOGLE_OAUTH_AUTO_CREATE_USER=true
GOOGLE_OAUTH_DEFAULT_ROLE=User
🧰 Tools
🪛 dotenv-linter (3.3.0)

[warning] 26-26: [UnorderedKey] The GOOGLE_OAUTH_ENABLED key should go before the OAUTH2_ENABLED key

(UnorderedKey)


[warning] 27-27: [UnorderedKey] The GOOGLE_OAUTH_CLIENT_ID key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)


[warning] 28-28: [UnorderedKey] The GOOGLE_OAUTH_CLIENT_SECRET key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)


[warning] 29-29: [UnorderedKey] The GOOGLE_OAUTH_REDIRECT_URI key should go before the OAUTH2_ENABLED key

(UnorderedKey)


[warning] 30-30: [UnorderedKey] The GOOGLE_OAUTH_AUTO_CREATE_USER key should go before the GOOGLE_OAUTH_CLIENT_ID key

(UnorderedKey)


[warning] 31-31: [UnorderedKey] The GOOGLE_OAUTH_DEFAULT_ROLE key should go before the GOOGLE_OAUTH_ENABLED key

(UnorderedKey)

🤖 Prompt for AI Agents
In .env.example around lines 24 to 31, the GOOGLE_OAUTH_REDIRECT_URI points to
port 7900 which conflicts with docker-compose host→container forwarding (host
7910 → container 7900) and can cause OAuth callback failures; update
GOOGLE_OAUTH_REDIRECT_URI to use http://localhost:7910/auth/oauth2/callback (or
make it configurable via env interpolation) so the host-facing port matches
docker-compose and OAuth callbacks succeed.

Comment on lines +85 to +86
- **환경 파일**: `env.example`에서 자동 생성
- **포트**: 7910 (API), Swagger UI 포함
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

파일명 오타(.env.example)

개발 배포 섹션의 파일명도 실제 파일과 일치시키세요.

-**환경 파일**: `env.example`에서 자동 생성
+**환경 파일**: `.env.example`에서 자동 생성
📝 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.

Suggested change
- **환경 파일**: `env.example`에서 자동 생성
- **포트**: 7910 (API), Swagger UI 포함
- **환경 파일**: `.env.example`에서 자동 생성
- **포트**: 7910 (API), Swagger UI 포함
🤖 Prompt for AI Agents
In deploy/DEPLOYMENT.md around lines 85 to 86, the referenced environment
filename is incorrect; update the text to use the correct filename
".env.example" (including the leading dot) so it matches the actual file in the
repo and any other mentions in the document; verify there are no other
occurrences of "env.example" elsewhere in the file and replace them with
".env.example" for consistency.

Comment on lines 64 to 69
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Redis 헬스체크 인증 누락 및 잘못된 커맨드

--requirepass를 켰지만 healthcheck에서 비밀번호를 전달하지 않습니다. 또한 incr ping은 비표준입니다. ping으로 단순화하고 -a를 추가하세요.

-    healthcheck:
-      test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
+    healthcheck:
+      test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "--raw", "ping"]
       interval: 30s
       timeout: 10s
       retries: 3
       start_period: 30s
📝 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.

Suggested change
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "--raw", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
🤖 Prompt for AI Agents
In deploy/docker-compose.prod.yml around lines 64 to 69, the Redis healthcheck
is missing authentication and uses a nonstandard command ("incr ping"); update
the healthcheck to authenticate with the Redis password (pass via -a using the
existing REDIS_PASSWORD environment variable or secret) and replace the command
with a simple authenticated ping (i.e., use redis-cli -a $REDIS_PASSWORD ping);
ensure the compose file references the correct env var/secret and that the
password is available to the healthcheck process.

@ImGdevel ImGdevel merged commit a4a46f9 into develop Sep 13, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant