From c64bac82606151ec550ef3cb2304675ef99ba422 Mon Sep 17 00:00:00 2001 From: rare-magma Date: Mon, 29 Jul 2024 21:43:33 +0200 Subject: [PATCH] Revert "ci: add healthcheck script" This reverts commit 422a3ee9c27bae518e3aa841d478c7db4966626e. Signed-off-by: rare-magma --- Dockerfile | 2 -- docker/healthcheck.js | 24 ------------------------ 2 files changed, 26 deletions(-) delete mode 100644 docker/healthcheck.js diff --git a/Dockerfile b/Dockerfile index 792371df0..e50c4c275 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,9 +59,7 @@ RUN apt-get update && apt-get install -y openssl \ COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps COPY ./docker/entrypoint.sh /ghostfolio/entrypoint.sh -COPY ./docker/healthcheck.js /ghostfolio/healthcheck.js WORKDIR /ghostfolio/apps/api EXPOSE ${PORT:-3333} USER node CMD [ "/ghostfolio/entrypoint.sh" ] -HEALTHCHECK --interval=15s --timeout=5s --start-period=2s --retries=3 CMD [ "node", "/ghostfolio/healthcheck.js" ] \ No newline at end of file diff --git a/docker/healthcheck.js b/docker/healthcheck.js deleted file mode 100644 index 4222a472e..000000000 --- a/docker/healthcheck.js +++ /dev/null @@ -1,24 +0,0 @@ -const http = require("node:http"); - -const options = { - host : "localhost", - path: "/api/v1/health", - port : "3333", -}; - -const healthCheck = http.request(options, (res) => { - if (res.statusCode === 200) { - process.exit(0); - } - else { - console.error(res.statusMessage) - process.exit(1); - } -}); - -healthCheck.on('error', (err) => { - console.error(err.message); - process.exit(1); -}); - -healthCheck.end(); \ No newline at end of file