Consider adding HEALTHCHECK
to Dockerfile
#3963
SaswatPadhi
started this conversation in
Ideas
Replies: 2 comments
-
Here is a little workaround in the meantime: instead of "image", use "build" in your docker-compose.yml
and add the healthcheck section to the teslamate service:
additionally, create
The build is needed since the original Dockerfile does not include curl. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@cusooner Yes, I use a similar workaround for now. To avoid a build, I use healthcheck:
test: "nc -z localhost 4000"
interval: 15s
timeout: 2s
start_period: 60s but this would only check if the port is "open". Your workaround would additionally check if the port is serving HTTP successfully. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I use an automation to monitor the health of all my running containers.
docker ps
for example shows the health status for currently running containers. However, no status is currently displayed for my teslamate container.Please consider adding a
HEALTHCHECK
instruction in teslamate's Dockerfile.A super simple health check could be just to
curl
port 4000 and see if the server is running (return code 200). But a better health check would be to somehow detect if teslamate is in an error state (either API keys are not configured, or no longer work, or the API is currently unavailable etc). I'm fairly new to this code base though, and am not sure how to query this.Beta Was this translation helpful? Give feedback.
All reactions