Closed chapa closed 4 years ago
I think it would be better to set it to unless-stopped
instead of always
. if we use always
, we will have a leftover runnning container when developing.
You're right, I thought always
restarts the container if the user stops it (like the behavior of deployment's pods in k8s), but actually it restarts it only when the docker daemon restarts.
I'll change to unless-stopped
which seems better
pretty cool, thanks!
Hey there,
I had a problem recently: the container stopped working because of a nasty error
pthread_create: Resource temporarily unavailable
. It stopped working but was always "healthy" from the docker point of view.This PR adds a
HEALTHCHECK
in the Dockerfile so that docker can detect if the service is down and restart the container if needed.I created a special endpoint
/health
for that, to avoid wasting resources by generating an image on/
.