diff --git a/docker-compose.yml b/docker-compose.yml index 805df68..1aed2aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ --- -version: "2.1" +version: "3.9" services: book-a-book-eureka: @@ -8,9 +8,9 @@ services: - "0.0.0.0:8762:8761" restart: unless-stopped healthcheck: - test: curl --fail http://localhost:8761 || exit 1 + test: ["curl --fail --silent localhost:8761/actuator/health | grep UP || exit 1"] interval: 60s - retries: 3 + retries: 5 timeout: 10s @@ -46,8 +46,10 @@ services: ports: - "0.0.0.0:8082:8081" depends_on: - - book-a-book-eureka - - postgres_buscador + book-a-book-eureka: + condition: service_healthy + postgres_buscador: + condition: service_healthy restart: unless-stopped book-a-book-operador: @@ -55,8 +57,10 @@ services: ports: - "0.0.0.0:8084:8083" depends_on: - - book-a-book-eureka - - postgres_operador + book-a-book-eureka: + condition: service_healthy + postgres_operador: + condition: service_healthy restart: unless-stopped