-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment and Operations
최건희 edited this page Aug 13, 2026
·
1 revision
CD는 main 브랜치 Push 또는 수동 실행으로 동작합니다.
main Push
→ Spotless / Build / Test
→ Flyway Migration 사전 검증
→ Docker Image Build
→ Amazon ECR Push
→ EC2에서 Image Pull
→ Application Container 교체
→ Health Check
→ Grafana Alloy 실행 확인
GitHub Actions의 현재 상태는 Actions에서 확인합니다.
| 항목 | 값 |
|---|---|
| Runtime | Java 21 |
| Application Profile | dev |
| Application Port | 8080 |
| Management Port | 8081 |
| Container Registry | Amazon ECR |
| Runtime Server | Amazon EC2 |
| Object Storage | Amazon S3 |
| Metrics Agent | Grafana Alloy |
운영 값은 GitHub Actions Secrets와 EC2의 배포 환경파일로 주입합니다.
- Database:
DB_HOST,DB_PORT,DB_NAME,DB_USERNAME,DB_PASSWORD - OAuth: Google/Kakao Client 및 Redirect URI
- Security:
JWT_SECRET,OAUTH_COOKIE_SECURE - Storage:
AWS_REGION,S3_BUCKET,CDN_BASE_URL - Mail:
MAIL_USERNAME,MAIL_PASSWORD - Frontend:
FRONTEND_BASE_URL,FRONTEND_ALLOWED_ORIGINS - Monitoring: Alloy 및 Grafana 전송 설정
Secret 값은 Wiki, Issue, PR, 로그에 직접 작성하지 않습니다.
- Application Health:
GET /api/v1/health - Actuator Health:
GET :8081/actuator/health - Prometheus Metrics:
GET :8081/actuator/prometheus - Pipeline: GitHub Actions의
CI,CDWorkflow
- GitHub Actions에서 실패한 Job과 최초 오류 Step을 확인합니다.
- Build/Test 실패인지 Migration 사전 검증 실패인지 구분합니다.
- ECR Image Push 성공 여부를 확인합니다.
- EC2에서 Application Container와 Alloy Container 상태를 확인합니다.
- Application 로그와 Health Check 응답을 확인합니다.
- Database Migration 실패 시 적용된 SQL을 수정하지 말고 새 Migration으로 복구합니다.
-
main에는dev브랜치로만 PR을 생성합니다. - 운영 배포 전 Migration은 임시 DB와 운영 DB 연결 기준으로 사전 검증합니다.
- IAM Role을 사용하는 서버에는 장기 AWS Access Key를 저장하지 않습니다.
- 장애 원인 분석에 필요한 로그만 남기고 인증정보와 개인정보는 기록하지 않습니다.