Skip to content

[#39] 빈 디렉터리 생성 문제 해결#43

Merged
1117mg merged 1 commit intodevfrom
bugfix/39-empty-nginx-dir-issue
Feb 5, 2026
Merged

[#39] 빈 디렉터리 생성 문제 해결#43
1117mg merged 1 commit intodevfrom
bugfix/39-empty-nginx-dir-issue

Conversation

@1117mg
Copy link
Member

@1117mg 1117mg commented Feb 5, 2026

작업 내용

  • nginx.conf 초기 설정 문제 방어

참고

  • 초기에 nginx.conf 파일이 없을 때 Docker Volume이 마운트되면서 nginx.conf 디렉터리를 생성하여 배포가 실패되는 문제 해결

관련 이슈

@1117mg 1117mg requested review from earlgrey02 and mjk25 February 5, 2026 01:57
@1117mg 1117mg self-assigned this Feb 5, 2026
@1117mg 1117mg added the fix 버그 수정 label Feb 5, 2026
@1117mg 1117mg linked an issue Feb 5, 2026 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

🤖 Gemini Code Review

✅ 변경 사항 요약

  • Nginx 설정 파일(nginx.conf) 생성 시 파일 존재 및 내용 유효성 검증 로직 추가.
  • Nginx 템플릿에서 OCSP 스테이플링(Stapling) 관련 지시어 제거.

🚨 치명적인 이슈 (Critical Issues)

  • 🛑 nginx/nginx.conf.template
    • Problem: ssl_stapling on;ssl_stapling_verify on; 지시어를 제거하여 OCSP Stapling 기능을 비활성화했습니다. 이 기능은 클라이언트의 TLS 핸드셰이크 시간을 단축하고(성능 저하), 클라이언트가 CA에 직접 OCSP 상태를 문의하는 것을 방지하여 프라이버시를 보호하는 표준 보안 강화 요소입니다.
    • Fix: 기능 제거 이유가 명확하지 않다면 해당 지시어를 복구하여 TLS 성능 및 보안 모범 사례를 유지해야 합니다.

✏️ 파일별 상세 리뷰

.github/workflows/deploy.yml

  • 📍 Issue: 배포 스크립트에서 envsubst 실행 후 파일 유효성 검증([ -f nginx/nginx.conf ] && [ -s nginx/nginx.conf ])을 통해 빈 파일이 생성되는 경우를 방지하도록 로직을 추가했습니다. 이는 배포 안정성 측면에서 필수적인 조치입니다.
  • Improvement: [ -d nginx/nginx.conf ] && rm -rf nginx/nginx.conf 구문은 nginx.conf가 디렉토리로 잘못 생성된 경우를 처리하는 로직이지만, 일반적인 파일 생성 시에는 불필요하며 복잡도를 증가시킵니다. 해당 파일은 바로 다음 줄에서 덮어쓰기 되므로, 디렉토리로 인한 예상치 못한 실패를 회피하기 위한 목적이 아니라면 삭제를 고려해야 합니다.

nginx/nginx.conf.template

  • (위 '치명적인 이슈'에서 언급) OCSP Stapling 기능 비활성화로 인한 성능 및 보안 약화가 발생했습니다. 기능 복구가 필수적입니다.

Copy link
Member

@earlgrey02 earlgrey02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@1117mg 1117mg merged commit adfbe04 into dev Feb 5, 2026
1 check passed
@1117mg 1117mg deleted the bugfix/39-empty-nginx-dir-issue branch February 5, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

빈 디렉토리 생성 문제 해결

2 participants