From fef427b90bfe816dcb538e7f1b4dec5c1c6a13cb Mon Sep 17 00:00:00 2001 From: sriram687 Date: Sun, 31 May 2026 19:14:37 +0530 Subject: [PATCH] fix(docker): add healthcheck and restart policy to docker-compose.yml --- docker-compose.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index abce615a5a..f13bbbeca6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,13 @@ services: - PORT=5001 ports: - "5001:5001" + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5001/health"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 30s presidio-analyzer: image: ${REGISTRY_NAME}/${IMAGE_PREFIX}presidio-analyzer${TAG} @@ -35,6 +42,13 @@ services: - OLLAMA_HOST=http://ollama:11434 ports: - "5002:5001" + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5001/health"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 30s depends_on: ollama: condition: service_healthy