Skip to content

[chore] 운영 서버 종료 및 개발 서버 단일화#362

Merged
hd0rable merged 1 commit into
developfrom
chore/blue-green-dev-server
Jun 24, 2026
Merged

[chore] 운영 서버 종료 및 개발 서버 단일화#362
hd0rable merged 1 commit into
developfrom
chore/blue-green-dev-server

Conversation

@hd0rable

@hd0rable hd0rable commented Jun 24, 2026

Copy link
Copy Markdown
Member

#️⃣ 연관된 이슈

closes #이슈번호

📝 작업 내용

운영 서버를 종료하고 개발 서버 하나로 통합
도메인을 변경하고, 개발 서버에 블루그린 무중단 배포를 적용

변경 사항

  • cd-workflow-dev.yml: APPLICATION_YML_DEV → APPLICATION_YML_PROD로 변경
  • cd-workflow-dev.yml: docker-compose up 단순 배포 → deploy.sh 블루그린 배포로 변경

EC2 직접 작업 내역

  • docker-compose.yml: 단일 컨테이너 → green/blue 2개로 변경
  • deploy.sh 생성 (블루그린 배포 스크립트)
  • nginx 설정:SSL 인증서 발급 및 설정
  • 보안 그룹 80/443 포트 오픈

📸 스크린샷

💬 리뷰 요구사항

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

📌 PR 진행 시 이러한 점들을 참고해 주세요

* P1 : 꼭 반영해 주세요 (Request Changes) - 이슈가 발생하거나 취약점이 발견되는 케이스 등
* P2 : 반영을 적극적으로 고려해 주시면 좋을 것 같아요 (Comment)
* P3 : 이런 방법도 있을 것 같아요~ 등의 사소한 의견입니다 (Chore)

Summary by CodeRabbit

  • 새 기능
    • 배포 방식이 개선되어 서비스 업데이트 시 중단 시간이 줄어들 수 있습니다.
  • 버그 수정
    • 배포 과정에서 기존 방식보다 더 안정적으로 새 버전을 반영하도록 변경했습니다.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

cd-workflow-dev.yml에서 application.yml 생성 시 참조하는 시크릿이 APPLICATION_YML_DEV에서 APPLICATION_YML_PROD로 변경되었습니다. 서버 배포 단계는 기존의 docker-compose 인라인 명령 및 이미지 프루닝 방식에서 docker pullsudo bash deploy.sh를 호출하는 블루-그린 배포 방식으로 교체되었습니다.

Changes

CD 워크플로우 배포 방식 변경

Layer / File(s) Summary
시크릿 소스 변경 및 블루-그린 배포 전환
.github/workflows/cd-workflow-dev.yml
application.yml 생성 시 참조 시크릿을 APPLICATION_YML_DEV에서 APPLICATION_YML_PROD로 변경하고, docker-compose stop/rm/updocker image prune 흐름을 docker ps -adocker pullsudo bash deploy.sh (블루-그린) 순서로 교체했습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • THIP-TextHip/THIP-Server#182: 동일한 cd-workflow-dev.yml 파일의 배포 로직(블루-그린 deploy.sh 호출 vs 인라인 Docker Compose 명령)을 수정하는 PR입니다.

Suggested labels

🌈 infra

Suggested reviewers

  • seongjunnoh

Poem

🐇 토끼가 서버 문을 두드리며 말했지,
"블루-그린으로 갈아타야 해, 낡은 compose는 이제 안녕!"
docker pull 한 번, deploy.sh 한 번,
PROD 시크릿 열쇠로 문을 열고,
무중단 배포로 깡충깡충 달려가네~ 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 운영 서버 종료와 개발 서버 단일화, 배포 방식 전환이라는 변경 목적을 잘 반영한 제목입니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/blue-green-dev-server

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.

@github-actions

Copy link
Copy Markdown

Test Results

488 tests   488 ✅  45s ⏱️
145 suites    0 💤
145 files      0 ❌

Results for commit 01110f8.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cd-workflow-dev.yml:
- Around line 79-83: Make the deployment image reference immutable by using a
fixed tag instead of pulling the default latest image in the CD workflow. Update
the image naming flow in the workflow and the deploy.sh handoff so build, push,
pull, and deploy all use the same tag derived from GITHUB_SHA (or another unique
commit-based tag), and ensure the docker pull command in the deployment step
references that exact tag consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2a43df81-675f-4597-97ed-edeab6a0b5b0

📥 Commits

Reviewing files that changed from the base of the PR and between 1347003 and 01110f8.

📒 Files selected for processing (1)
  • .github/workflows/cd-workflow-dev.yml

Comment on lines 79 to +83
echo "🥳 Pulling new image"
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_IMAGE }}

echo "🌱 Starting new container"
sudo docker-compose up -d
sudo docker image prune -a -f

echo "🚀 Run Blue-Green Deploy Script"
sudo bash deploy.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major

이미지 태그를 불변 값으로 고정하세요. docker pull이 태그 없이 실행돼 동시 CD에서 다른 실행이 푸시한 최신 이미지가 배포될 수 있습니다. GITHUB_SHA 같은 고정 태그를 build/push/pull/deploy.sh 전반에 일관되게 전달하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd-workflow-dev.yml around lines 79 - 83, Make the
deployment image reference immutable by using a fixed tag instead of pulling the
default latest image in the CD workflow. Update the image naming flow in the
workflow and the deploy.sh handoff so build, push, pull, and deploy all use the
same tag derived from GITHUB_SHA (or another unique commit-based tag), and
ensure the docker pull command in the deployment step references that exact tag
consistently.

@hd0rable hd0rable merged commit 1503562 into develop Jun 24, 2026
4 checks passed
@hd0rable hd0rable deleted the chore/blue-green-dev-server branch June 24, 2026 16:02
@sehynn

sehynn commented Jun 25, 2026

Copy link
Copy Markdown

띱은 제 최애 서비스였는데 종료한다니 아쉽네요.. 하..

@hd0rable

Copy link
Copy Markdown
Member Author

서비스 종료 아닙니다 ^^

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.

2 participants