From b7565116e7412434a0eecd9028f8b6877433a889 Mon Sep 17 00:00:00 2001 From: PPawlowski Date: Fri, 15 Nov 2024 13:34:40 +0100 Subject: [PATCH] Add example healthcheck --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5aa247b..af4c9fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -136,6 +136,13 @@ services: target: /docker-entrypoint-initdb.d/02-setup-context-db.sh volumes: - db:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + broker: image: "iegomez/mosquitto-go-auth:latest-mosquitto_2.0.15" networks: