-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add in a health check #10
Comments
That would be a great addition. Feel free to contribute ;-) |
Ok, had a quick look. This won't be possible without including the client tools which I see you were not massively keen on: #8 So, two options, either this is a good enough reason to include the client tools, or I create a second DockerFile for a healthcheck version of this container. Also need to find a way to pass through credentials to the healthcheck since I have mine protected via the config! Not sure how easy thats going to be! |
Just an update - close, but not quite reliable yet (it actually totally crashes docker somehow if the password isn't correct!) https://stackoverflow.com/questions/39275666/script-to-check-mosquitto-is-healthy |
Sorry to poke an ancient issue, but I found this while googling to see if there were any plans to add a |
I added this healthcheck for the mosquitto docker container on my docker-compose.yaml healthcheck: |
@neurove - your post started me thinking. What do you think about IOTstack issue 415 as an expansion on your idea? |
@neurove I tried your healthcheck but getting this error: |
@genieai-vikas maybe take a look at SensorsIot/IOTstack and, in particular The IOTstack solution started with the basic idea from @neurove but grew. It has been "in production" with IOTstack for the last month and no issues have come in yet (touch wood). There is also some documentation that may prove useful. |
For documentation purposes, I changed the healthcheck to: healthcheck: using -E instead of -C 1 exits immediately after subscribing instead of waiting for a message being published |
Now that docker 1.12 supports health checks it would be great to see it added. I'm happy to do a PR if you want
The text was updated successfully, but these errors were encountered: