Skip to content

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

Open
sriram687 wants to merge 1 commit into
microsoft:mainfrom
sriram687:fix/docker-healthcheck-restart
Open

fix(docker): add healthcheck and restart policy to docker-compose.yml#2051
sriram687 wants to merge 1 commit into
microsoft: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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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:
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

2 participants