Conversation
Owner
Author
|
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.
📚 작업 개요
closes #13
main브랜치 푸시 시 Docker 이미지 빌드 → DockerHub 푸시 → EC2 서버 배포까지 자동화했습니다.🛠️ 작업 내용 요약
1. GitHub Actions 워크플로우 구성
docker-compose.yml복사 → 원격 배포 자동 실행GitHub Actions에서 EC2 및 DockerHub 접근을 위해 필요한 환경 변수들을 GitHub Secrets에 등록해두었습니다.

2. Dockerfile 작성
3. docker-compose.yml 구성
spring-plus:latest이미지로 컨테이너 실행8080→ 외부80연결application-prod.yml은 EC2에서 직접 마운트🧐 질문 사항
환경 설정 파일은 어떻게 관리하는 게 좋을까요?
지금은
application-prod.yml을 EC2에 직접 두고 있는데(수동으로 접속해서 설정했습니다), CI/CD 과정에 포함하는 게 좋을까요?현재는 spring.profiles.active=prod만 사용해서 운영 설정을 분리하고 있는데, 인프라 환경이 달라지면 cloudType 같은 사용자 정의 환경 변수를 추가로 사용하는 게 좋은지 궁금합니다. (강의에서는 cloudType을 사용하는 방식으로 나와 있어서, 필수인지 혼동이 오기도 합니다 ㅎㅎ) 현업에서도 이런 식으로 cloudType 같은 변수를 분기해서 관리하는 경우가 많은가요?