소스 검색

patch Healtcheck

- Add optional PORT
- added `-n` to jq to return expected exit code when input is empty/null
ScribblerCoder 9 달 전
부모
커밋
175d1cc8f2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Dockerfile

+ 1 - 1
Dockerfile

@@ -151,7 +151,7 @@ COPY --chown=$UID:$GID ./backend .
 
 EXPOSE 8080
 
-HEALTHCHECK CMD curl --silent --fail http://localhost:8080/health | jq -e '.status == true' || exit 1
+HEALTHCHECK CMD curl --silent --fail http://localhost:${PORT:-8080}/health | jq -ne 'input.status == true' || exit 1
 
 USER $UID:$GID