diff --git a/docker/Dockerfile b/docker/Dockerfile index fa001452..e729be14 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -129,7 +129,7 @@ ONBUILD RUN \ -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + -ONBUILD HEALTHCHECK --interval=5m --timeout=3s \ +ONBUILD HEALTHCHECK --interval=5s --timeout=2s \ CMD python3 health_check.py || exit 1 ENTRYPOINT ["/sbin/tini", "-s", "--"] diff --git a/docker/README.rst b/docker/README.rst index f2faae7c..59ca8362 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -33,7 +33,8 @@ start.sh health_check.py This file will be used for checking the status of the application running in - the container. It will be useful for container orchestration like Kubernetes + the container. It should be used to inform Docker that service is operating + and healthy. It will be useful for container orchestration like Kubernetes or Docker Swarm to properly handle services that are still running but stopped being responsive. Avoid using `curl` directly and instead, use `health_check.py` written with specific service in mind. It will provide more