Skip to content

[DEPLOY] 백엔드 v2.1.1 배포#241

Merged
leegwichan merged 10 commits intomainfrom
develop
Mar 9, 2026
Merged

[DEPLOY] 백엔드 v2.1.1 배포#241
leegwichan merged 10 commits intomainfrom
develop

Conversation

@leegwichan
Copy link
Member

🚩 연관 이슈

🗣️ 리뷰 요구사항 (선택)

  • 각자 하신 작업 main 머지되도 문제없는지 확인 부탁드립니다.
  • 오늘 저녁 7시 전에 머지할 예정이니 확인 부탁해요!

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34c0cc5a-b0a6-4093-bfe4-133abd1e4766

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 새로운 Docker 기반 배포 시스템을 도입하여 애플리케이션의 배포 및 모니터링 환경을 개선합니다. Datadog와 Traefik을 통합하여 서비스 가시성과 라우팅 기능을 강화했습니다. 또한, WebSocket을 활용한 실시간 통신 기능을 추가하여 토론방 내 이벤트 공유와 같은 새로운 사용자 경험을 제공합니다. 기관별 토론 템플릿 관리 기능을 구현하여 사용자가 다양한 토론 형식을 쉽게 활용할 수 있도록 지원하며, 오래된 투표를 자동으로 정리하는 스케줄러를 통해 시스템의 효율성을 높였습니다. 전반적으로 백엔드 인프라와 핵심 기능을 확장하고 안정성을 향상시키는 데 중점을 두었습니다.

Highlights

  • 새로운 Docker 기반 배포 시스템 도입: 애플리케이션, Datadog, Traefik, Webhook 서비스를 위한 Dockerfile 및 docker-compose 설정이 추가되어 새로운 배포 환경이 구축되었습니다.
  • WebSocket을 통한 실시간 통신 기능 추가: 스프링 웹소켓 의존성, 설정 클래스, 인증 리졸버 및 공유 컨트롤러가 추가되어 실시간 이벤트 공유 기능이 구현되었습니다.
  • 기관별 토론 템플릿 기능 구현: 기관별 토론 템플릿을 관리하고 조회하는 새로운 도메인, 엔티티, 리포지토리, 서비스 및 컨트롤러가 추가되었습니다.
  • 오래된 투표 자동 정리 스케줄러 추가: 일정 시간 이상 경과한 진행 중인 투표를 자동으로 '완료' 상태로 변경하는 스케줄러가 도입되었습니다.
  • 의존성 업데이트 및 Excel Export 기능 제거: springdoc-openapi-starter-webmvc-ui 버전이 업데이트되었고, Micrometer StatsD 레지스트리가 추가되었으며, Excel Export 관련 의존성이 제거되었습니다.
  • CORS 설정 리팩토링: CORS 설정이 ConfigurationProperties를 사용하여 관리되도록 리팩토링되었습니다.
Changelog
  • .gitignore
    • 배포 관련 파일(/letsencrypt/acme.json, .serena)을 무시 목록에 추가했습니다.
  • build.gradle
    • WebSocket 의존성을 추가했습니다.
    • Excel Export 관련 의존성을 제거했습니다.
    • Micrometer Prometheus 레지스트리를 StatsD 레지스트리로 업데이트했습니다.
    • Springdoc OpenAPI UI 버전을 2.6.0에서 2.7.0으로 업데이트했습니다.
    • jar 태스크를 비활성화했습니다.
  • docker/Dockerfile
    • Spring Boot 애플리케이션 빌드를 위한 멀티스테이지 Dockerfile을 추가했습니다.
  • docker/application/docker-compose.application.yml
    • 애플리케이션 서비스의 Docker Compose 설정을 추가했습니다. Datadog APM 및 StatsD 통합 환경 변수를 포함합니다.
  • docker/datadog/docker-compose.datadog.yml
    • Datadog 에이전트 서비스의 Docker Compose 설정을 추가했습니다.
  • docker/docker-compose.yml
    • 다른 서비스별 Docker Compose 파일을 포함하는 루트 Docker Compose 파일을 추가했습니다.
  • docker/traefik/docker-compose.traefik.yml
    • Traefik 리버스 프록시 및 로드 밸런서 서비스의 Docker Compose 설정을 추가했습니다.
  • docker/webhook/docker-compose.webhook.yml
    • Webhook 서비스의 Docker Compose 설정을 추가했습니다.
  • docker/webhook/hooks.json
    • 배포 및 상태 확인 명령을 위한 webhook 설정을 추가했습니다.
  • docker/webhook/webhook.Dockerfile
    • Webhook 서비스의 Dockerfile을 추가했습니다.
  • nginx/api.dev.debate-timer.com
    • 개발 API 도메인에 대한 Nginx 설정 파일을 추가했습니다.
  • nginx/api.prod.debate-timer.com
    • 운영 API 도메인에 대한 Nginx 설정 파일을 추가했습니다.
  • scripts/deploy/check-deploy-status.sh
    • 배포 스크립트의 상태를 확인하는 쉘 스크립트를 추가했습니다.
  • scripts/deploy/deploy-docker.sh
    • Docker 기반의 무중단 배포를 위한 쉘 스크립트를 추가했습니다.
  • scripts/dev/zero-downtime-deploy.sh
    • 개발 환경에서 무중단 배포를 수행하는 쉘 스크립트를 추가했습니다.
  • scripts/init/auto-swap.sh
    • 스왑 메모리를 자동으로 생성하고 설정하는 쉘 스크립트를 추가했습니다.
  • scripts/init/init-docker.sh
    • Docker를 설치하고 사용자 권한을 설정하는 쉘 스크립트를 추가했습니다.
  • scripts/init/init-letsencrypt.sh
    • letsencrypt 디렉토리를 초기화하는 쉘 스크립트를 추가했습니다.
  • scripts/nginx-switch-port.sh
    • Nginx 업스트림 포트를 전환하는 쉘 스크립트를 추가했습니다.
  • scripts/prod/zero-downtime-deploy.sh
    • 운영 환경에서 무중단 배포를 수행하는 쉘 스크립트를 추가했습니다.
  • src/main/java/com/debatetimer/config/CorsConfig.java
    • CORS 설정을 CorsProperties를 사용하도록 리팩토링했습니다.
  • src/main/java/com/debatetimer/config/CorsProperties.java
    • CORS 오리진 속성을 관리하는 새로운 클래스를 추가했습니다.
  • src/main/java/com/debatetimer/config/SchedulerConfig.java
    • 스프링 스케줄링 기능을 활성화하는 설정 클래스를 추가했습니다.
  • src/main/java/com/debatetimer/config/WebConfig.java
    • ExcelExportInterceptor 및 관련 등록 코드를 제거했습니다.
  • src/main/java/com/debatetimer/config/sharing/WebSocketAuthMemberResolver.java
    • WebSocket 메시지에서 멤버를 인증하는 리졸버를 추가했습니다.
  • src/main/java/com/debatetimer/config/sharing/WebSocketConfig.java
    • 메시지 브로커 및 STOMP 엔드포인트 설정을 포함하는 WebSocket 설정 클래스를 추가했습니다.
  • src/main/java/com/debatetimer/controller/organization/OrganizationController.java
    • 기관 관련 API 엔드포인트를 위한 새로운 컨트롤러를 추가했습니다.
  • src/main/java/com/debatetimer/controller/sharing/SharingController.java
    • WebSocket 기반 공유 이벤트를 위한 새로운 컨트롤러를 추가했습니다.
  • src/main/java/com/debatetimer/domain/customize/TeamName.java
    • 팀 이름의 최대 길이를 8에서 15로 늘렸습니다.
  • src/main/java/com/debatetimer/domain/organization/Organization.java
    • Organization 도메인 클래스를 추가했습니다.
  • src/main/java/com/debatetimer/domain/organization/OrganizationTemplate.java
    • OrganizationTemplate 도메인 클래스를 추가했습니다.
  • src/main/java/com/debatetimer/domainrepository/organization/OrganizationDomainRepository.java
    • Organization 도메인 리포지토리를 추가했습니다.
  • src/main/java/com/debatetimer/domainrepository/poll/PollDomainRepository.java
    • 오래된 투표의 상태를 업데이트하는 메서드를 추가했습니다.
  • src/main/java/com/debatetimer/dto/organization/OrganizationResponse.java
    • 기관 응답을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/dto/organization/OrganizationResponses.java
    • 기관 응답 목록을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/dto/organization/OrganizationTemplateResponse.java
    • 기관 템플릿 응답을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/dto/sharing/request/ChairmanSharingRequest.java
    • 사회자 공유 요청을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/dto/sharing/request/SharingRequest.java
    • 공유 요청을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/dto/sharing/response/SharingResponse.java
    • 공유 응답을 위한 DTO를 추가했습니다.
  • src/main/java/com/debatetimer/entity/customize/CustomizeTableEntity.java
    • 생성자에서 usedAt 할당 로직을 수정했습니다.
  • src/main/java/com/debatetimer/entity/organization/OrganizationEntity.java
    • Organization JPA 엔티티를 추가했습니다.
  • src/main/java/com/debatetimer/entity/organization/OrganizationTemplateEntity.java
    • OrganizationTemplate JPA 엔티티를 추가했습니다.
  • src/main/java/com/debatetimer/event/sharing/RoomSubscribeListener.java
    • WebSocket 방 구독 이벤트를 처리하는 리스너를 추가했습니다.
  • src/main/java/com/debatetimer/exception/errorcode/ClientErrorCode.java
    • INVALID_ROOM_ID 오류 코드를 추가했습니다.
  • src/main/java/com/debatetimer/repository/organization/OrganizationRepository.java
    • Organization JPA 리포지토리를 추가했습니다.
  • src/main/java/com/debatetimer/repository/organization/OrganizationTemplateRepository.java
    • OrganizationTemplate JPA 리포지토리를 추가했습니다.
  • src/main/java/com/debatetimer/repository/poll/PollRepository.java
    • JpaRepository 대신 Repository를 확장하도록 변경하고, 오래된 투표 상태를 업데이트하는 메서드를 추가했습니다.
  • src/main/java/com/debatetimer/repository/poll/VoteRepository.java
    • JpaRepository 대신 Repository를 확장하도록 변경하고, save 및 count 메서드를 추가했습니다.
  • src/main/java/com/debatetimer/scheduler/PollCleanupScheduler.java
    • 오래된 투표를 정리하는 스케줄러를 추가했습니다.
  • src/main/java/com/debatetimer/service/organization/OrganizationService.java
    • 기관 관련 비즈니스 로직을 처리하는 새로운 서비스를 추가했습니다.
  • src/main/resources/application-dev.yml
    • CORS 오리진 설정을 업데이트했습니다.
  • src/main/resources/application-monitor.yml
    • Datadog용 StatsD 메트릭 내보내기 설정을 추가했습니다.
  • src/main/resources/application-prod.yml
    • CORS 오리진 설정을 업데이트했습니다.
  • src/main/resources/application.yml
    • Graceful shutdown 설정을 추가했습니다.
  • src/main/resources/db/migration/V15__create_organization_template.sql
    • organization 및 organization_template 테이블을 생성하는 SQL 스크립트를 추가했습니다.
  • src/test/java/com/debatetimer/BaseStompTest.java
    • STOMP WebSocket 테스트를 위한 기본 클래스를 추가했습니다.
  • src/test/java/com/debatetimer/MessageFrameHandler.java
    • STOMP WebSocket 테스트를 위한 메시지 프레임 핸들러를 추가했습니다.
  • src/test/java/com/debatetimer/config/CorsPropertiesTest.java
    • CorsConfigTest를 CorsPropertiesTest로 이름을 변경하고 참조를 업데이트했습니다.
  • src/test/java/com/debatetimer/controller/BaseControllerTest.java
    • OrganizationEntity 및 OrganizationTemplateEntity 생성기를 추가했습니다.
  • src/test/java/com/debatetimer/controller/BaseDocumentTest.java
    • OrganizationService 목 객체를 추가했습니다.
  • src/test/java/com/debatetimer/controller/GlobalControllerTest.java
    • CORS 오리진 값 참조를 업데이트하고 정적 파일 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/controller/Tag.java
    • ORGANIZATION_API 태그를 추가했습니다.
  • src/test/java/com/debatetimer/controller/organization/OrganizationControllerTest.java
    • OrganizationController에 대한 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/controller/organization/OrganizationDocumentTest.java
    • OrganizationController에 대한 REST Docs를 추가했습니다.
  • src/test/java/com/debatetimer/controller/sharing/SharingControllerTest.java
    • SharingController에 대한 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/domainrepository/BaseDomainRepositoryTest.java
    • OrganizationEntity 및 OrganizationTemplateEntity 생성기를 추가했습니다.
  • src/test/java/com/debatetimer/domainrepository/organization/OrganizationDomainRepositoryTest.java
    • OrganizationDomainRepository에 대한 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/entity/customize/CustomizeTableEntityTest.java
    • 테스트에서 usedAt 시간 비교 로직을 업데이트했습니다.
  • src/test/java/com/debatetimer/event/sharing/RoomSubscribeListenerTest.java
    • RoomSubscribeListener에 대한 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/fixture/HeaderGenerator.java
    • 액세스 토큰을 포함한 STOMP 헤더를 생성하는 메서드를 추가했습니다.
  • src/test/java/com/debatetimer/fixture/entity/OrganizationEntityGenerator.java
    • OrganizationEntity를 위한 픽스처 생성기를 추가했습니다.
  • src/test/java/com/debatetimer/fixture/entity/OrganizationTemplateEntityGenerator.java
    • OrganizationTemplateEntity를 위한 픽스처 생성기를 추가했습니다.
  • src/test/java/com/debatetimer/scheduler/PollCleanupSchedulerTest.java
    • PollCleanupScheduler에 대한 테스트를 추가했습니다.
  • src/test/java/com/debatetimer/service/BaseServiceTest.java
    • OrganizationEntity 및 OrganizationTemplateEntity 생성기를 추가했습니다.
  • src/test/java/com/debatetimer/service/organization/OrganizationServiceTest.java
    • OrganizationService에 대한 테스트를 추가했습니다.
  • src/test/resources/application.yml
    • CORS 오리진 설정을 업데이트했습니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/Dev_CD.yml
    • .github/workflows/Prod_CD.yml
Activity
  • 작성자는 각자 작업한 내용이 main 브랜치에 병합되어도 문제가 없는지 확인을 요청했습니다.
  • 작성자는 오늘 저녁 7시 전에 병합할 예정이니 확인을 요청했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@coli-geonwoo coli-geonwoo left a comment

Choose a reason for hiding this comment

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

/noti

approve 합니다! 무중단 배포 dev에서도 잘 되었는데 prod에서도 잘 되겠지!

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR aims to establish a new deployment infrastructure utilizing Docker, Traefik, and Datadog, alongside introducing real-time sharing via WebSockets and institution-specific template features. While these are significant improvements, a security audit revealed critical vulnerabilities: the WebSocket implementation lacks ownership checks in SharingController, potentially allowing any authenticated user to hijack debate rooms, and the Docker setup exposes the Docker socket in the webhook container, posing a high risk of host compromise. Additionally, general Docker configuration issues were noted, such as running containers as the root user and healthcheck configuration errors. These security and stability concerns must be addressed before merging.

@leegwichan leegwichan merged commit 1d4d94a into main Mar 9, 2026
7 of 9 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.

3 participants