diff --git a/Dockerfile b/Dockerfile index 006ba39..6e3d9c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,11 @@ COPY nginx.conf.template /etc/nginx/nginx.conf.template # Make the script executable RUN chmod +x /entrypoint.sh +# HEALTHCHECK instruction using curl to check the health of the NGINX server +# Install curl, then set up the health check +RUN apk add --no-cache curl +HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ + CMD curl -f http://localhost:8080/healthz || exit 1 + # Use the script as the entrypoint ENTRYPOINT ["/entrypoint.sh"]