From 762a4a4ae92efc2f79535df2d6d42407023f3710 Mon Sep 17 00:00:00 2001 From: Jakob Berlin Date: Wed, 17 Feb 2021 23:53:16 +0100 Subject: [PATCH] Add mongo healthcheck see #58 --- docker-compose.tmpl.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.tmpl.yml b/docker-compose.tmpl.yml index 61bb07b..e52b951 100644 --- a/docker-compose.tmpl.yml +++ b/docker-compose.tmpl.yml @@ -95,6 +95,7 @@ services: mongodb: image: mongo:4.4 restart: unless-stopped + test: bash -c "if mongo --eval 'quit(db.runCommand({ ping':' 1 }).ok ? 0 ':' 2)'; then exit 0; fi; exit 1;" networks: bbb-net: ipv4_address: 10.7.7.6