From d032374ad61528453966898dd2cd66123c6be550 Mon Sep 17 00:00:00 2001 From: abdulla-ashurov Date: Thu, 29 Jun 2023 12:18:56 +0500 Subject: [PATCH] Add healtcheck for logto service. --- docker/with-external-db/docker-compose-with-db.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker/with-external-db/docker-compose-with-db.yml b/docker/with-external-db/docker-compose-with-db.yml index c9c3399c..43820982 100644 --- a/docker/with-external-db/docker-compose-with-db.yml +++ b/docker/with-external-db/docker-compose-with-db.yml @@ -16,7 +16,7 @@ services: app-migrations: condition: service_completed_successfully logto: - condition: service_started + condition: service_healthy ports: - 3000:3000 env_file: @@ -78,6 +78,11 @@ services: - 3002:3002 env_file: - logto.env + healthcheck: + test: ["CMD", "wget", "--quiet", "--spider", "--tries=1", "--timeout=5", "http://localhost:3002/api/status"] + interval: 10s + timeout: 5s + retries: 5 profiles: - logto - app