Skip to content

fix(docker): add healthcheck and restart policy to docker-compose.yml#2051

Closed
sriram687 wants to merge 1 commit into
data-privacy-stack:mainfrom
sriram687:fix/docker-healthcheck-restart
Closed

fix(docker): add healthcheck and restart policy to docker-compose.yml#2051
sriram687 wants to merge 1 commit into
data-privacy-stack:mainfrom
sriram687:fix/docker-healthcheck-restart

Conversation

@sriram687

Copy link
Copy Markdown

Summary

This PR fixes three related Docker configuration gaps across
docker-compose.yml and Dockerfile.transformers.


Changes

1. Added healthcheck to docker-compose.yml

Both presidio-analyzer and presidio-anonymizer expose a /health
endpoint but had no healthcheck defined in the compose file.

+   healthcheck:
+     test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
+     interval: 30s
+     timeout: 5s
+     retries: 3
+     start_period: 30s

2. Added restart policy to docker-compose.yml

Without a restart policy, a crashed container stays dead permanently.

+   restart: unless-stopped

Files Changed

File Change
docker-compose.yml Added healthcheck + restart to both services

Related

Fixes #2050

Copilot AI review requested due to automatic review settings May 31, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds restart policies and healthchecks to the presidio-anonymizer and presidio-analyzer services in docker-compose.yml to improve service reliability and observability.

Changes:

  • Adds restart: unless-stopped to both services
  • Adds HTTP healthcheck against /health endpoint for both services

Comment thread docker-compose.yml
Comment on lines +27 to +28
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
Comment thread docker-compose.yml
Comment on lines +26 to +27
restart: unless-stopped
healthcheck:
@SharonHart

Copy link
Copy Markdown
Contributor

Thanks for the contribution! We’re closing this as superseded by #2149, which covers the same docker-compose.yml healthcheck/restart-policy fix and extends it to the remaining compose services (ollama restart policy and presidio-image-redactor healthcheck/restart policy).

Appreciate you opening the original issue and PR here.

@SharonHart SharonHart closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] docker-compose.yml: missing healthcheck, restart policy

3 participants