From 3382ca2f605ded398eceaf3e4504381d75bfc1a4 Mon Sep 17 00:00:00 2001 From: xucai Date: Thu, 13 Mar 2025 22:38:37 +0800 Subject: [PATCH] add healthcheck --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5be6604b176..d16ec6ed20b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: depends_on: - db # Indicates that this service depends on the 'db' service, ensuring 'db' starts first healthcheck: # Defines the health check configuration for the container - test: [ "CMD", "curl", "-f", "http://localhost:4000/health/liveliness" ] # Command to execute for health check + test: [ "CMD", "curl", "-f", "http://localhost:4000/health/liveliness || exit 1" ] # Command to execute for health check interval: 30s # Perform health check every 30 seconds timeout: 10s # Health check command times out after 10 seconds retries: 3 # Retry up to 3 times if health check fails