-
Notifications
You must be signed in to change notification settings - Fork 650
Add healthcheck in Dockerfile #812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add healthcheck to ensure service availability and verify CURL installation.
Added validation to ensure CURL is installed in the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a basic HTTP health check to the Dockerfile to improve web server stability by ensuring the container can accept HTTP requests before routing traffic to it.
- Adds validation to confirm curl is available in the final Docker image
- Implements a health check that tests HTTP connectivity on port 8099
- Configures health check with 1-minute intervals and 3-second timeout
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
common/Dockerfile
Outdated
|
||
ENV NODE_ENV production | ||
|
||
# Validation to confirm that CURL is installed in the final image. |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected capitalization of 'CURL' to 'curl'.
# Validation to confirm that CURL is installed in the final image. | |
# Validation to confirm that curl is installed in the final image. |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Part of: Koenkk/zigbee2mqtt#28893
This adds a basic health check.
A more complete check (including whether the HTTP server is connected to MQTT) would be useful, but that’ll require server-side changes — so it’s better left for a follow-up.
Even so, this should already improve web server stability, since the Supervisor won’t route traffic to the app until it can accept HTTP requests.