From cffd5c82d2ec020e9411f29c3341ee3941cc33cc Mon Sep 17 00:00:00 2001 From: Jose Costa Teixeira Date: Sun, 10 Dec 2023 15:08:41 +0100 Subject: [PATCH] add healthcheck --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index db9675217..4c324476e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,14 @@ RUN cp /usr/local/lib/*.so* /usr/lib/ RUN /work/fhirserver/build/linux-fhirserver.sh /work/bootstrap RUN cp exec/pack/*.properties exec/64 +# Install curl for the health check +RUN apt-get update && apt-get install -y curl + +# Set the health check +HEALTHCHECK --interval=1m --timeout=10s --retries=5 \ + CMD curl -f http://localhost:${PORT}/fhir/metadata || exit 1 + +# Set the environment variables ENV DISPLAY :99 ENV PORT 80 ENV TERMINOLOGY_CACHE /terminology