-
Notifications
You must be signed in to change notification settings - Fork 0
✅ [Deploy] v0.5.0 배포 #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
✅ [Deploy] v0.5.0 배포 #135
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c58334f
🔥 del: 기존 deploy.yml 제거
kingmingyu d7e2089
✨ feat: ci 설정 추가
kingmingyu 33a4b7b
✨ feat: cd 설정 추가
kingmingyu d0ed219
✨ feat: docker-compose.yml 추가
kingmingyu 12713b0
✨ feat: Dockerfile 추가
kingmingyu 3c99fe3
♻️ refactor: secret 이름 변경
kingmingyu 5d0e592
Feat/#128 CICD 설정 추가
kingmingyu 3b1ae9c
🐛 fix: openjdk -> eclipse-temurin로 변경
kingmingyu 3d3714b
✨ feat: 스프링 액츄에이터 추가
rlawngjs0313 deba748
✨ feat: 모니터링 URI Public URI 허용
rlawngjs0313 373083c
🚀 chore: 커밋 웹훅 테스트
rlawngjs0313 e668f3c
🚀 chore: 커밋 푸시 테스트
rlawngjs0313 0c69d7c
🚀 chore: 코파일럿 코드 리뷰 테스트
rlawngjs0313 4fe48dd
✨ [Feat] 모니터링 도구 도입
rlawngjs0313 1329240
✨ feat: 코드래빗 설정파일 추가
rlawngjs0313 40504c0
✨ [Feat] 코드래빗 설정파일 추가
rlawngjs0313 bee2ea5
♻️ refactor: Swagger 버전업 (0.4.0 -> 0.5.0)
rlawngjs0313 f6deab7
♻️ refactor: 코드래빗 설정 파일 변경 (관련 PR 자동 링크 해제)
rlawngjs0313 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # 리뷰 언어 설정 - 한국어로 피드백을 받습니다 | ||
| language: "ko-KR" | ||
|
|
||
| reviews: | ||
| # 리뷰 강도 설정 | ||
| # assertive(꼼꼼) / chill(부드럽게) 중 선택 | ||
| profile: "chill" | ||
|
|
||
| # true로 설정 시, 모든 리뷰 코멘트가 resolve되면 자동으로 승인(Approve) | ||
| request_changes_workflow: false | ||
|
|
||
| # PR 요약 | ||
| high_level_summary: true # PR 전반적인 변경 내용 요약 | ||
| changed_files_summary: true # 파일별 변경 내용 요약 | ||
|
|
||
| # 워크스루를 접힌 상태로 표시해 PR 페이지가 너무 길어지는 것을 방지 | ||
| collapse_walkthrough: true | ||
|
|
||
| # 코드 흐름을 시각적으로 파악할 수 있는 시퀀스 다이어그램 생성 | ||
| sequence_diagrams: true | ||
|
|
||
| # 연결된 이슈를 분석해 리뷰에 맥락을 추가 | ||
| assess_linked_issues: true | ||
|
|
||
| # 관련 이슈/PR 자동 링크 (팀 규모가 작아 비활성화) | ||
| related_issues: false | ||
| related_prs: false | ||
|
|
||
| # 레이블 자동 제안/적용 (수동으로 관리) | ||
| suggested_labels: false | ||
| auto_apply_labels: false | ||
|
|
||
| # 리뷰어 추천/자동 할당 (수동으로 지정) | ||
| suggested_reviewers: false | ||
| auto_assign_reviewers: false | ||
|
|
||
| # -------------------------------------------------------------- # | ||
| # 자동 리뷰 설정 # | ||
| # -------------------------------------------------------------- # | ||
| auto_review: | ||
| # PR 생성 시 자동으로 리뷰 시작 | ||
| enabled: true | ||
| # 기존 리뷰가 있는 PR에 새 커밋이 추가되면 변경분만 다시 리뷰 | ||
| auto_incremental_review: true | ||
|
|
||
| # ================================================================ # | ||
| # 채팅 설정 # | ||
| # ================================================================ # | ||
| chat: | ||
| # @coderabbitai 멘션 없이도 PR 코멘트에 자동으로 응답 | ||
| auto_reply: true | ||
|
|
||
| # ================================================================ # | ||
| # 지식 베이스 설정 # | ||
| # ================================================================ # | ||
| knowledge_base: | ||
| # 리뷰 시 최신 문서나 정보를 웹에서 검색해 참고할 수 있도록 허용 | ||
| web_search: | ||
| enabled: true | ||
|
|
||
| # 레포에 코딩 컨벤션이나 가이드라인 문서가 있다면 리뷰에 반영 | ||
| code_guidelines: | ||
| enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| - [ ] 기타 사소한 수정 | ||
|
|
||
| ## ❗️ 관련 이슈 링크 | ||
| Close # | ||
| Closed # | ||
|
|
||
| ## 📌 개요 | ||
| - | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: SCOI CD | ||
| on: | ||
| push: | ||
| branches: [ "develop" ] | ||
|
|
||
| env: | ||
| # 도커 허브 저장소 이름 (예: myusername/scoi-backend) | ||
| DOCKER_IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/scoi-backend | ||
|
|
||
| jobs: | ||
| # 📦 1단계: 빌드 및 도커 이미지 푸시 | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 체크아웃 | ||
| uses: actions/checkout@v4 | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
|
|
||
| - name: 자바 설정 Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| cache: 'gradle' | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
|
|
||
| - name: application.yml 주입 | ||
| shell: bash | ||
| run: | | ||
| mkdir -p src/main/resources | ||
| cat > src/main/resources/application.yml <<'EOF' | ||
| ${{ secrets.DEV_APPLICATION_YML }} | ||
| EOF | ||
|
|
||
| - name: firebase json 주입 | ||
| shell: bash | ||
| run: | | ||
| mkdir -p src/main/resources | ||
| cat > src/main/resources/firebase-scoi.json <<'EOF' | ||
| ${{ secrets.FIREBASE_JSON }} | ||
| EOF | ||
|
|
||
| - name: gradlew 실행 권한 부여 | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: gradle 빌드 (테스트 제외) | ||
| run: ./gradlew clean build -x test | ||
|
|
||
| - name: Docker Hub 로그인 | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
|
||
| - name: Docker 이미지 빌드 및 푸시 | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| push: true | ||
| tags: ${{ env.DOCKER_IMAGE_NAME }}:latest | ||
|
|
||
|
|
||
| deploy: | ||
| needs: build-and-push | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: EC2에 배포 (SSH 접속) | ||
| uses: appleboy/ssh-action@master | ||
| with: | ||
| host: ${{ secrets.EC2_HOST }} | ||
| username: ${{ secrets.EC2_SSH_USER }} | ||
| key: ${{ secrets.EC2_SSH_KEY }} | ||
|
|
||
| script: | | ||
| cd ~/scoi-Backend | ||
|
|
||
| echo "${{ secrets.DEV_ENV_FILE }}" > .env | ||
| echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> .env | ||
|
|
||
| # Docker Hub에서 방금 만든 최신 이미지 가져오기 | ||
| sudo docker-compose pull | ||
|
|
||
| # 컨테이너 재실행 | ||
| sudo docker-compose up -d | ||
|
|
||
| # 불필요한 이미지 삭제 | ||
| sudo docker image prune -f | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: SCOI CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main", "develop" ] | ||
| pull_request: | ||
| branches: [ "main", "develop" ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
|
|
||
| # CI 서버 내부에서 테스트용 DB/Redis 컨테이너 실행 | ||
| services: | ||
| mysql: | ||
| image: mysql:8.0 | ||
| env: | ||
| MYSQL_ROOT_PASSWORD: root | ||
| MYSQL_DATABASE: scoi | ||
| ports: | ||
| - 3306:3306 | ||
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
|
||
| redis: | ||
| image: redis:latest | ||
| ports: | ||
| - 6379:6379 | ||
| options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
|
|
||
| steps: | ||
| - name: 체크아웃 | ||
| uses: actions/checkout@v4 | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
|
|
||
| - name: 자바 설정 Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| cache: 'gradle' | ||
|
|
||
| - name: application.yml 주입 | ||
| shell: bash | ||
| run: | | ||
| mkdir -p src/main/resources | ||
| cat > src/main/resources/application.yml <<'EOF' | ||
| ${{ secrets.DEV_APPLICATION_YML }} | ||
| EOF | ||
|
|
||
| # firebase 파일 생성 | ||
| - name: firebase json 주입 | ||
| shell: bash | ||
| run: | | ||
| mkdir -p src/main/resources | ||
| cat > src/main/resources/firebase-scoi.json <<'EOF' | ||
| ${{ secrets.FIREBASE_JSON }} | ||
| EOF | ||
|
|
||
| - name: gradlew 실행 권한 부여 | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: gradle 빌드 | ||
| run: ./gradlew build | ||
|
|
||
| # CI용 | ||
| env: | ||
| DB_URL: jdbc:mysql://localhost:3306/scoi?serverTimezone=Asia/Seoul | ||
| DB_USERNAME: root | ||
| DB_PASSWORD: root | ||
| REDIS_HOST: localhost | ||
| REDIS_PORT: 6379 | ||
| JWT_KEY: scoi-test-key | ||
| JWT_SECRET: scoi-test-secret-keysdsdsdsdsdsdssdsdsdsdsdsdsdsdsdsdsdsdsdsdsds | ||
| COOLSMS_API_URL: test_coolsms_api_key | ||
| COOLSMS_API_SECRET: test_coolsms_secret_key | ||
| COOLSMS_API_KEY: test_coolsms_key | ||
| COOLSMS_FROM_NUMBER: 01000000000 | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| FROM eclipse-temurin:21-jdk-alpine | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY build/libs/*SNAPSHOT.jar app.jar | ||
|
|
||
| ENTRYPOINT ["java", "-jar", "-Duser.timezone=Asia/Seoul", "app.jar"] | ||
|
rlawngjs0313 marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.