From 54946e06fda2167cc9edec59ef580ea5f29e4777 Mon Sep 17 00:00:00 2001 From: Abkari Mohammed Sayeem <169171880+Sayeem3051@users.noreply.github.com> Date: Sun, 15 Mar 2026 13:43:21 +0530 Subject: [PATCH] Add HEALTHCHECK to Dockerfile for container health monitoring Adds HEALTHCHECK instruction to the nginx stage as mentioned in issue #32. This addresses the 'Health Checks' requirement by: - Checking container health every 30 seconds - Verifying nginx is responding to HTTP requests - Improving operational monitoring and reliability Fixes: #32 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e8455afe..9c29caf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,5 @@ WORKDIR /usr/share/nginx/html RUN rm -rf ./* COPY --from=builder /app/dist . EXPOSE 80 -ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file +HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost/ || exit 1 +ENTRYPOINT ["nginx", "-g", "daemon off;"]