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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: festabook/backend
Length of output: 1102
🏁 Script executed:
Repository: festabook/backend
Length of output: 198
🏁 Script executed:
Repository: festabook/backend
Length of output: 450
🏁 Script executed:
Repository: festabook/backend
Length of output: 291
🏁 Script executed:
Repository: festabook/backend
Length of output: 2153
🏁 Script executed:
# Check the start.sh script which likely handles directory setup cat -n infra/start.shRepository: festabook/backend
Length of output: 931
🏁 Script executed:
# Check if directory creation is handled in other infra scripts cat -n infra/appspec.ymlRepository: festabook/backend
Length of output: 641
🏁 Script executed:
# Check docker-compose.yml for volume or directory setup cat -n src/main/resources/docker-compose.ymlRepository: festabook/backend
Length of output: 858
🏁 Script executed:
Repository: festabook/backend
Length of output: 90
🏁 Script executed:
# Check CI/CD prod workflow cat -n .github/workflows/ci-cd-prod.ymlRepository: festabook/backend
Length of output: 3395
로그 디렉터리 사전 생성 로직이 배포 파이프라인에 누락되었습니다
더 구체적인 하위 디렉터리로 로그 경로를 조정한 것은 좋은 개선이지만, prod 배포 시 실제로 동작하지 않을 가능성이 높습니다.
문제의 핵심:
RollingFileAppender는 로그 파일이 저장될 디렉터리를 자동으로 생성하지 않습니다. 따라서
/var/log/festabook디렉터리가 미리 존재하지 않으면:현재 배포 구조의 문제점:
현재 배포 파이프라인을 살펴보면:
infra/start.sh- JAR만 실행하고 디렉터리 생성 로직이 없음infra/appspec.yml- ApplicationStart 훅에서 디렉터리 생성 처리 안 함.github/workflows/ci-cd-prod.yml- 배포 전 사전 준비 단계 없음해결 방법 (3가지 선택지):
옵션 1: start.sh에서 디렉터리 생성 (가장 간단)
옵션 2: appspec.yml의 BeforeInstall 훅 추가 (권장)
옵션 3: AWS CodeDeploy 호스트 사전 설정 (인프라 접근 가능 시)
이 중 옵션 2를 권장합니다. 배포 자동화 파이프라인이 모든 사전 조건을 처리하도록 설계하는 것이 운영 일관성 면에서 가장 안전합니다.
🤖 Prompt for AI Agents