From b40830da76a4c7ac6faa41eeb247a5a06275ccc4 Mon Sep 17 00:00:00 2001 From: sethsimmons Date: Fri, 12 Mar 2021 18:06:34 +0100 Subject: [PATCH] Add healthcheck to docker-compose.yml Adds a healthcheck that can be used for monitoring or autohealing. --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 77ec161..317c21b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,10 @@ services: - 8080:8080 networks: - teddit_net + healthcheck: + test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"] + interval: 1m + timeout: 3s depends_on: - redis networks: