From 6dd8342bf08188622116e242122bb25b42085d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Vos?= Date: Sun, 15 Aug 2021 15:34:17 +0200 Subject: Add healthcheck to Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 19d01f8..d7179fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,9 @@ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets COPY entrypoint.sh /entrypoint.sh +HEALTHCHECK --interval=5s --timeout=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1 + EXPOSE ${PORT} VOLUME /www/assets ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] -- cgit v1.2.3