diff --git a/docker-compose.yml b/docker-compose.yml index 756282d..cfc2d0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,6 +43,12 @@ services: condition: service_healthy migrate: condition: service_completed_successfully + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:3000/health || exit 1"] + interval: 5s + timeout: 5s + retries: 20 + start_period: 10s web: build: @@ -53,7 +59,14 @@ services: extra_hosts: - "host.docker.internal:host-gateway" depends_on: - - api + api: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"] + interval: 5s + timeout: 5s + retries: 20 + start_period: 10s volumes: postgres_data: