Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ jobs:
TARGET_USER: ${{ secrets.RASPI_TARGET_USER }}
run: |
ssh -o StrictHostKeyChecking=no -o ProxyJump=$JUMP_USER@$JUMP_HOST:$JUMP_PORT $TARGET_USER@$TARGET_HOST /bin/bash << ENDSSH
docker image prune -af --filter "until=72h" || true
docker image prune -af --filter "until=72h" --filter "reference=ghcr.io/wisoft-prepair/backend-java*" || true
ENDSSH
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EXPOSE 7300

# 컨테이너 레벨 헬스체크 (Docker daemon의 status 표시용)
HEALTHCHECK --interval=24h --timeout=10s --start-period=40s --retries=3 \
CMD curl -sf http://localhost:7300/health || exit 1
CMD curl -sf http://localhost:7300/actuator/health || exit 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

헬스체크 경로를 /actuator/health로 수정한 것은 적절합니다. 다만, 현재 HEALTHCHECK 설정의 interval24h(24시간)로 설정되어 있습니다(36번 라인). 이로 인해 컨테이너 시작 후 첫 번째 헬스체크가 24시간 뒤에나 수행되며, 장애 발생 시 감지 및 복구에 매우 긴 시간이 소요됩니다. 일반적으로 interval30s~1m 정도로 설정하는 것이 권장됩니다.


# 실행
ENTRYPOINT ["java", "-jar", "app.jar"]
Loading