Added health checks to Dockerfiles

Health check commands have been added to the Dockerfiles. These checks will run at an interval of 30 seconds, with a timeout of 10 seconds and a start period of 5 seconds. The system will retry these checks up to three times before marking the service as unhealthy. Different health check commands are used depending on the specific Dockerfile.
This commit is contained in:
Jeroen De Meerleer 2024-12-13 11:35:58 +01:00
parent 0de1cd40ac
commit 0fc2298106
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
3 changed files with 5 additions and 0 deletions

View File

@ -55,3 +55,5 @@ RUN bash -c "if [ -n \"${VERSION}\" ] ; then echo ${VERSION} > ${WEBCRON_ROOT}/
USER root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:80/health || exit 1

View File

@ -41,3 +41,5 @@ RUN bash -c "if [ -n \"${VERSION}\" ] ; then echo ${VERSION} > ${WEBCRON_ROOT}/
USER root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD bin/console webcron:health

View File

@ -55,3 +55,4 @@ RUN bash -c "if [ -n \"${VERSION}\" ] ; then echo ${VERSION} > ${WEBCRON_ROOT}/
USER root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD curl -f http://localhost:80 || exit 1