Skip to content

Commit c06f449

Browse files
author
Alex
committed
Improve health check
1 parent 82c8243 commit c06f449

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ USER node
4545
# Expose dashboard port (HTTP). HTTPS optional per config (5151)
4646
EXPOSE 5150 5151
4747

48-
# Basic healthcheck: consider healthy if HTTP port is listening
49-
HEALTHCHECK --interval=60s --timeout=5s --start-period=30s --retries=3 \
50-
CMD node -e 'require("net").createConnection({host:"127.0.0.1",port:5150},c=>{c.end();process.exit(0)}).on("error",()=>process.exit(1))' || exit 1
48+
# Healthcheck: perform lightweight HTTP request to ensure app responding
49+
RUN apk add --no-cache curl
50+
HEALTHCHECK --interval=30s --timeout=5s --start-period=45s --retries=5 \
51+
CMD curl -fsS http://127.0.0.1:5150/config/appVersion?health || exit 1
5152

5253
ENTRYPOINT ["node", "dist/app.js"]

0 commit comments

Comments
 (0)