From 83527c09e3e2666486518184ad9a2d4edabd1891 Mon Sep 17 00:00:00 2001 From: TekenujUi90 <318323039+TekenujUi90@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:41:28 +0100 Subject: [PATCH] feat(docker): add container healthcheck --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5717823..7e48aba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,6 @@ COPY --from=build --chown=streamgive:nodejs /app/dist ./dist USER streamgive EXPOSE 3000 +HEALTHCHECK --interval=30s --timeout=3s --start-period=20s --retries=3 \ + CMD node -e "fetch('http://127.0.0.1:3000/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))" CMD ["node", "dist/index.js"]