From 986bf553a66124aab84f9a70799ffb81eaed87f9 Mon Sep 17 00:00:00 2001 From: Ludovic Claude <ludovic.claude@laposte.net> Date: Thu, 26 Apr 2018 05:00:27 +0200 Subject: [PATCH] Fix health checks --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 130856b51..b79069b16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,8 @@ ARG BUILD_DATE ARG VCS_REF ARG VERSION +ENV CONTEXT_PATH "/services" + RUN apk add --update --no-cache curl COPY docker/config/application.tmpl /config/application.tmpl @@ -28,11 +30,11 @@ COPY --from=java-build-env /project/target/portal-backend.jar /usr/share/jars/ ENTRYPOINT ["/run.sh"] -# 8080: Web service API, health checks on http://host:8080/health +# 8080: Web service API, health checks on http://host:8080/$CONTEXT_PATH/health # 4089: Akka cluster EXPOSE 4089 8080 -HEALTHCHECK --start-period=60s CMD curl -v --silent http://localhost:8080/health 2>&1 | grep UP +HEALTHCHECK --start-period=60s CMD curl -v --silent http://localhost:8080/$CONTEXT_PATH/health 2>&1 | grep UP LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="hbpmip/portal-backend" \ -- GitLab