From acd7768f81386f6e0588363dc762c16368cbd591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Sat, 4 Oct 2025 09:23:56 +0200 Subject: [PATCH] Add health check --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 03667a4..a18f0f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,13 @@ WORKDIR /project RUN ["zola", "build"] FROM ghcr.io/static-web-server/static-web-server:2.38.1-alpine +ENV SERVER_HEALTH=true WORKDIR / +RUN apk --no-cache add curl COPY --from=zola /project/public /public +HEALTHCHECK \ + --interval=30s \ + --timeout=5s \ + --start-period=5s \ + --retries=3 \ + CMD ["curl", "http://localhost/health"]