[8주차] 김민지 / [deploy] docker-compose.yml 파일 작성 및 Github Actions 기반 CI/CD 파이프라인 구축 #140
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.
1. 무슨 이유로 코드를 변경했나요?
GitHub Actions 기반 CI/CD 파이프라인 구축 및
docker-compose.yml파일을 활용한 자동 배포 환경을 설정하기 위해 변경했습니다.2. 어떤 위험이나 장애를 발견했나요?
원인
기본 설정으로 MySQL 컨테이너를 실행할 경우 EC2 t3.micro 환경에서 CPU 사용량이 급격히 증가하며 컨테이너가 종료되는 문제가 발생했습니다.
해결
docker-compose.yml내부 MySQL 서비스에 아래와 같은 명령(command)을 추가하여 성능 관련 기능을 비활성화하고 메모리 사용량을 줄였습니다.3. 관련 스크린샷을 첨부해주세요.
- docker compose pull & up 실행 화면



- EC2 서버 컨테이너 실행 화면

4. 완료 사항
5. 추가 사항
closed #139