Skip to content

chore: CI/CD 파이프라인 NCP에서 AWS + GHCR로 전환#395

Open
SnailW wants to merge 11 commits intomainfrom
chore/388-migrate-cicd-to-aws-ghcr
Open

chore: CI/CD 파이프라인 NCP에서 AWS + GHCR로 전환#395
SnailW wants to merge 11 commits intomainfrom
chore/388-migrate-cicd-to-aws-ghcr

Conversation

@SnailW
Copy link
Collaborator

@SnailW SnailW commented Mar 4, 2026

🔗 관련 이슈

✅ 작업 내용

  • 이미지 레지스트리 전환 (NCP → GHCR)

    • NCP Container Registry 로그인/태그/푸시 → GHCR 로그인 + docker buildx build --push 통합
    • GITHUB_TOKEN 기반 인증으로 별도 Secret 불필요
    • IMAGE_PREFIX 환경변수로 이미지 경로 통합 관리
    • packages: write 권한 추가
  • 배포 Job 인스턴스별 분리

    • 기존 deploy_to_server (NCP 단일 서버) → deploy_frontend + deploy_backend 병렬 실행
    • WebServer: docker-compose.webserver.yml 기반 Nginx + 프론트엔드 배포
    • WAS: docker-compose.was.yml 기반 NestJS 백엔드 배포
    • 인스턴스별 독립 Health Check

💬 참고 사항

  • GHCR_PAT(pat classic, read: package) 시크릿의 경우 90일의 만료 기한으로 설정했습니다. 90일 간격으로 업데이트가 필요합니다.

SnailW added 9 commits March 4, 2026 16:36
- proxy_pass 대상을 ${WAS_HOST} 환경변수로 주입
- HTTPS 리다이렉트만 수행하는 블록에서 Gzip, 보안 헤더, body size 제한 제거
- NCP Container Registry 로그인/태그/푸시 → GHCR 로그인 + buildx --push 통합
- IMAGE_PREFIX 환경변수로 이미지 경로 통합 관리
- packages: write 권한 추가
- deploy_frontend + deploy_backend 병렬 실행
- AWS 인스턴스별 독립 배포
- 자체 Redis Private IP
- GHCR PAT 기반 EC2 이미지 pull
- 인스턴스별 독립 Health Check
@SnailW SnailW linked an issue Mar 4, 2026 that may be closed by this pull request
4 tasks
@auto-assign auto-assign bot requested review from Grit03, as-zini and davidpro08 March 4, 2026 12:20
@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web15-ipconfig-frontend Ready Ready Preview, Comment Mar 6, 2026 8:21pm

@github-actions github-actions bot added the ⚙️ chore 설정 파일 수정, 패키지 매니저 관리 등 label Mar 4, 2026
Copy link
Collaborator

@davidpro08 davidpro08 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1/api/health || true)
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 301 ] || [ "$HTTP_CODE" -eq 302 ]; then
echo "Health Check Passed! (HTTP $HTTP_CODE)"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/api/health || true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

나머지 3000번 포트도 얼핏 보이는데, 바꿀 수 있으면 바꾸는 게 좋을 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ chore 설정 파일 수정, 패키지 매니저 관리 등

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUB] CI/CD 파이프라인 GHCR + AWS 배포 전환

2 participants