From 447219b2007679293661bd7c1586e6b20ea2cb72 Mon Sep 17 00:00:00 2001 From: AleixMT Date: Wed, 17 Jan 2024 01:14:58 +0100 Subject: [PATCH] ADDED: healthcheck implementation --- docker-compose.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1aed2aa..084948f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,10 +8,11 @@ services: - "0.0.0.0:8762:8761" restart: unless-stopped healthcheck: - test: ["curl --fail --silent localhost:8761/actuator/health | grep UP || exit 1"] - interval: 60s + test: ["CMD-SHELL", "curl --fail --silent localhost:8761/actuator/health | grep -q UP"] + interval: 15s retries: 5 timeout: 10s + start_period: 5s postgres_operador: @@ -49,7 +50,7 @@ services: book-a-book-eureka: condition: service_healthy postgres_buscador: - condition: service_healthy + condition: service_started restart: unless-stopped book-a-book-operador: @@ -60,7 +61,7 @@ services: book-a-book-eureka: condition: service_healthy postgres_operador: - condition: service_healthy + condition: service_started restart: unless-stopped