Wirecloud / docker-wirecloud

🐳 Docker Official Image packaging for WireCloud https://conwet.fi.upm.es/wirecloud
Other
8 stars 14 forks source link

Add healthcheck command in wirecloud's image #25

Closed samgh96 closed 5 years ago

samgh96 commented 5 years ago

This PR adds a healthcheck command in the Dockerfile.

aarranz commented 5 years ago

Hi @samgh96,

thanks for the contribution!

Only some details, I think the default timeout is too large (30s), taking into account that the version request should take ~20 ms in a decent machine. It's true that default should cope with small installations and use a timeout with enough room for taking into account some lags. I think that something in the range of 3s would be a better option.

Also, it'd be great if you add this healthcheck configuration on the other images.

aarranz commented 5 years ago

Can you add the healthcheck also on the dev image? Also, is it really needed the || exit 1 part of the healthcheck command?

samgh96 commented 5 years ago

It is, HEALTHCHECK only supports exit codes of 0 and 1, and curl --fail exit code differ from 1 depending on the error.

aarranz commented 5 years ago

Ok, thanks 😄. So the only missing piece is to add the healthcheck on the dev image and I will merge your PR.