From f03504ef554b167af268244e2d79c35af315a9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Rubio?= Date: Wed, 27 Mar 2024 17:40:30 +0100 Subject: [PATCH] Move healthcheck condition to docker compose override. --- docker-compose.override.yml | 3 +++ docker-compose.yml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 0a2f074..e501167 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -13,6 +13,9 @@ services: start_period: 10s aspnetcore.examples.entityframeworkcore.api: + depends_on: + aspnetcore.examples.entityframeworkcore.data: + condition: service_healthy environment: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_HTTP_PORTS=8080 diff --git a/docker-compose.yml b/docker-compose.yml index 31b1e15..062049c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,7 @@ services: image: ${DOCKER_REGISTRY-}aspnetcoreexamplesentityframeworkcoreapi container_name: aspnetcore.exmaples.entityframeworkcore.api depends_on: - aspnetcore.examples.entityframeworkcore.data: - condition: service_healthy + - aspnetcore.examples.entityframeworkcore.data build: context: . dockerfile: AspNetCore.Examples.EntityFrameworkCore.Api/Dockerfile