Conversation
- docker-compose.prod.yml에 MySQL 8 컨테이너 추가 (app -> mysql 연결) - DataInitializer로 부하테스트용 시드(과목 20개/회원 N명) 생성, app.seed 프로퍼티로 on/off 및 회원 수 제어 (BCrypt 처리) - application-prod.yml MySQL 접속 파라미터 보강(allowPublicKeyRetrieval 등) - .env.example 템플릿 추가, .gitignore에 .env/Terraform 산출물 제외 - DEPLOY.md 배포 계획 체크리스트 추가
Terraform 기반 임시 EC2 배포로 전환하면서, 고정 EC2에 SSH로 배포하던 CD 스텝을 제거하고 이미지 빌드/push만 수행하도록 변경. 서버 배포는 terraform apply(user-data가 :latest pull)가 담당. - cd.yml: develop push -> :latest 이미지 빌드/push - cd-test.yml: test/** push -> SHA 태그 이미지 빌드/push - EC2_HOST/EC2_PRIVATE_KEY/DB_* secret 의존성 제거
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
❤️ 기능 설명
기존 수동 배포를 Terraform(IaC) 기반으로 재구성하고, 단일 EC2에 앱을 재배포할 수 있도록 구성했습니다.
배포 구조
app+mysql+redis컨테이너 (docker-compose)terraform apply로 생성 /terraform destroy로 삭제 → 테스트할 때만 기동 (비용 최소화)주요 변경
docker-compose.prod.yml에 MySQL 8 컨테이너 추가 (외부 DB → 내장 컨테이너)DataInitializer추가 (과목/회원,app.seed로 on/off·수량 제어, BCrypt 처리)terraform/IaC 코드 추가 — 기본 VPC 조회, 보안그룹(22 내IP·80 전체), 키페어, EC2, user-data 부트스트랩.env.example추가,.gitignore에.env/Terraform 산출물(tfstate·tfvars·.terraform) 제외DEPLOY.md배포 가이드 추가연결된 issue
연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #76
✅ 체크리스트