From 853e955b62bc7cf7827ae324a7e8c03e3bb71216 Mon Sep 17 00:00:00 2001 From: Seweryn Zeman Date: Wed, 27 May 2020 17:19:43 +0200 Subject: [PATCH] Change Dockerfile HEALTHCHECK intervals (#14317) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We should not use such a long `HEALTHCHECK` `--interval` as first task check if happening after given time, and before healthcheck returns `0` – **task won't be available** to the Docker networks – meaning that Mattermost won't work until then even if it deployed correctly! And in Docker envs it happens often – that DB is available all the time, and just MM app is being updated. In this case even if we are healthy since 1s – we need to wait 5min until it goes online. --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 6560e56c18..7988d160b9 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -31,7 +31,7 @@ RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \ USER mattermost #Healthcheck to make sure container is ready -HEALTHCHECK --interval=5m --timeout=3s \ +HEALTHCHECK --interval=30s --timeout=10s \ CMD curl -f http://localhost:8065/api/v4/system/ping || exit 1