From c946f3631207721f3c0a840cf6a40680c7f65b19 Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Thu, 26 Oct 2017 14:26:42 +0200 Subject: [PATCH] Add a health check to the docker image See https://docs.docker.com/engine/reference/builder/#healthcheck --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0edbdb19..ad970576 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,6 @@ ENV PIPELINE2_LOCAL=false \ PIPELINE2_WS_AUTHENTICATION_KEY=clientid \ PIPELINE2_WS_AUTHENTICATION_SECRET=sekret EXPOSE 8181 +# for the healthcheck use PIPELINE2_HOST if defined. Otherwise use localhost +HEALTHCHECK --interval=30s --timeout=10s --start-period=1m CMD curl --fail http://${PIPELINE2_WS_HOST-localhost}:${PIPELINE2_WS_PORT:-8181}/${PIPELINE2_WS_PATH:-ws}/alive || exit 1 ENTRYPOINT ["/opt/daisy-pipeline2/bin/pipeline2"]