From 6d1a39d04ae66834467072c140aceda228759cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCckel?= Date: Fri, 13 Dec 2024 10:19:53 +0100 Subject: [PATCH] feat: increase retries but decrease the interval and timeout To decrease the downtime within a deployment if we check for condition: service_healthy --- opensearch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensearch/Dockerfile b/opensearch/Dockerfile index 2207adf..b793cc3 100644 --- a/opensearch/Dockerfile +++ b/opensearch/Dockerfile @@ -8,4 +8,4 @@ ENV plugins.security.ssl.http.enabled=false ARG JQ_VERSION=1.7 ADD --chmod=755 https://github.com/stedolan/jq/releases/download/jq-$JQ_VERSION/jq-linux64 /usr/bin/jq -HEALTHCHECK --interval=2s --timeout=20s --retries=20 CMD if [ "$(curl --silent --fail -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} localhost:9200/_cluster/health | jq .number_of_nodes)" -gt 0 ]; then exit 0; else exit 1; fi +HEALTHCHECK --interval=1s --timeout=5s --retries=60 CMD if [ "$(curl --silent --fail -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} localhost:9200/_cluster/health | jq .number_of_nodes)" -gt 0 ]; then exit 0; else exit 1; fi