From d8ec584c65f4f6d68600394f50a238d05555ce48 Mon Sep 17 00:00:00 2001 From: Fechin Date: Mon, 25 Nov 2024 20:31:36 +0800 Subject: [PATCH] health check --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 24a2b67..6322340 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,5 @@ RUN apk add --no-cache nginx && mkdir -p /run/nginx COPY --from=build /usr/share/nginx/html/ /usr/share/nginx/html/ COPY --from=build /etc/nginx/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +HEALTHCHECK --interval=1s --timeout=3s CMD wget -q -O - http://localhost:80 || exit 1 +CMD ["nginx", "-g", "daemon off;"]