health check

This commit is contained in:
Fechin committed 2024-11-25 20:31:36 +08:00
1 parent 84a9d5bb19
commit d8ec584c65
1 file changed
+2 -1
+2 -1
View File
@@ -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;"]
HEALTHCHECK --interval=1s --timeout=3s CMD wget -q -O - http://localhost:80 || exit 1
CMD ["nginx", "-g", "daemon off;"]