Added Healthcheck
This commit is contained in:
parent
f534f34cac
commit
9972656e5f
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue