From e1bce5aaf6db6de270e740a343ebd076571dc240 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 5 Jan 2021 17:35:03 -0700 Subject: [PATCH] feature(CONFIG): add healthcheck --- build/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index 44c040f..1aa147b 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -25,6 +25,10 @@ RUN apk --no-cache add git \ && rm -rf /tmp/* \ && rm -rf /tmp/.git* +# health check +HEALTHCHECK --interval=60s --timeout=5s --start-period=30s --retries=3 \ + CMD curl --fail http://127.0.0.1:9000 || exit 1 + # standardized labels LABEL maintainer="Asif Bacchus " LABEL org.label-schema.cmd="docker run -d --rm --name ab-nginx [--env-file ab-nginx.params] [-v /my_certs:/certs] [-v /my_nginx_config_files:/etc/nginx/config] [-v /my_nginx_server_blocks:/etc/nginx/sites] [-v /my_html_stuff:/usr/share/nginx/html] docker.asifbacchus.app/nginx/ab-nginx"