1
0
Fork 0

Added Healthcheck

This commit is contained in:
colin 2023-12-12 16:51:27 +00:00
parent f534f34cac
commit 9972656e5f
1 changed files with 6 additions and 0 deletions

View File

@ -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"]