瀏覽代碼

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