deploy: nginx + Let's Encrypt HTTPS 구성 및 DB 시크릿 관리 개선 (리뷰 기록용) - #2
Merged
Conversation
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.
📌 Summary
해당 PR에서 작업한 내용을 간단히 요약해주세요.
api.zipzip.site도메인 + nginx 리버스 프록시 + Let's Encrypt HTTPS 구성docker run→docker compose기반으로 전환✅ Tasks
이번 PR에서 수행한 작업을 체크리스트로 작성해주세요.
deploy/디렉토리 신설: nginx+certbot+api compose 스택, nginx 설정(80 리다이렉트 + 443 SSL)SPRING_DATASOURCE_URL/USERNAME/PASSWORD를 GitHub Secrets에 개별 등록, 배포 시 stdin으로 서버에 전달🔥 Troubleshooting
작업 중 발생한 문제와 해결 과정을 작성해주세요. 없다면 "없음"으로 작성해주세요.
컴파일이 돌아 매우 느렸음 → JAR을 CD에서 네이티브로 먼저 빌드하고 Dockerfile은 결과물만 COPY하도록 분리
DOCKER_USERNAMEvsDOCKERHUB_USERNAME)로 Docker Hub 로그인 실패 → 이름 통일SSH_PRIVATE_KEY시크릿에 등록된 값이 실제로는 forced command 제한이 없는 다른 키였던 것으로 확인됨(배포 시
deploy: command not found에러로 발견). 로컬 키 파일에서gh secret set으로 직접 재등록해 해결.이 시크릿을 다룰 땐 콘솔 복붙보다 파일에서 직접 등록하는 걸 권장.
docker-compose.yml에 개인 Docker Hub 계정명(hamtorygoals)이 하드코딩되어 있던 것을${DOCKERHUB_IMAGE}변수로 분리(서버 전용
.env, git 미포함)📸 API Test Results
화면, API 테스트, Postman, Swagger, 프론트 캡처 등 검증 결과를 첨부해주세요.
https://api.zipzip.site/actuator/health→{"status":"UP"}https://api.zipzip.site/swagger-ui/index.html→ 200http://api.zipzip.site/...→ 301 → HTTPS 리다이렉트 확인🔍 To Reviewer
리뷰어가 중점적으로 봐줬으면 하는 부분이나 질문을 작성해주세요.