fix(cd): 배포 스크립트 내 JSON 환경변수 파싱 오류 수정 #271
Merged
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.
📄 Work Description
문제점
GitHub Actions의 ssh-action을 통해 배포 스크립트를 실행할 때, 여러 줄로 구성된
FIREBASE_SERVICE_KEY_JSON시크릿이 따옴표로 보호되지 않아 셸(shell) 파싱 오류를 일으켰습니다.이로 인해
docker run명령어가 비정상적으로 중단되어 컨테이너가 제대로 실행되지 못했고, 결국 헬스 체크 단계에서 실패했습니다.해결 방안
docker run명령어의-e옵션에서FIREBASE_SERVICE_KEY_JSON변수를 작은따옴표(' ')로 감싸, 해당 시크릿 값이 하나의 완전한 문자열로 전달되도록 수정했습니다.또한, 배포 스크립트의 안정성을 위해 'set -e' 옵션을 유지하고 포트 확인 및 컨테이너 정리 로직을 개선했습니다.