Skip to content

[Chore] Add healthcheck and restart policy to docker-compose.yml#2149

Merged
SharonHart merged 2 commits into
data-privacy-stack:mainfrom
hiro-nikaitou:fix/docker-compose-healthcheck-restart
Jul 13, 2026
Merged

[Chore] Add healthcheck and restart policy to docker-compose.yml#2149
SharonHart merged 2 commits into
data-privacy-stack:mainfrom
hiro-nikaitou:fix/docker-compose-healthcheck-restart

Conversation

@hiro-nikaitou

Copy link
Copy Markdown
Contributor

Summary

Add healthcheck and restart: unless-stopped policy to all services in docker-compose.yml so containers auto-recover on crash and Docker can detect service readiness at the compose level.

Related Issue

Closes #2050

Changes

Service Healthcheck Restart
ollama ✅ already existed ✅ added
presidio-anonymizer ✅ added ✅ added
presidio-analyzer ✅ added ✅ added
presidio-image-redactor ✅ added ✅ added

Type of Change

  • Bug fix (non-breaking change)
  • New feature

Checklist

  • I have read the contributing guidelines.
  • My code follows the existing style.
  • CI is green (passing all checks).

Notes

  • All three Presidio service images already include curl and a built-in HEALTHCHECK instruction in their Dockerfiles. This PR makes the healthcheck explicit at the compose level for better visibility and configurability for operators.
  • The restart: unless-stopped policy prevents containers from staying dead after unexpected crashes (e.g. OOM during NLP model load).

Add healthcheck and restart: unless-stopped to all services in
docker-compose.yml so containers auto-recover on crash and Docker
can detect service readiness.

- ollama: add restart: unless-stopped (healthcheck already existed)
- presidio-anonymizer: add healthcheck + restart: unless-stopped
- presidio-analyzer: add healthcheck + restart: unless-stopped
- presidio-image-redactor: add healthcheck + restart: unless-stopped

Closes data-privacy-stack#2050

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hiro-nikaitou

Copy link
Copy Markdown
Contributor Author

CI workflows require approval from a maintainer (standard for first-time contributors). Once approved, checks should pass since this change is limited to docker-compose.yml and does not affect any application logic.

Ready for review when CI is green.

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

Adds Compose-level healthchecks and restart: unless-stopped policies to improve service readiness visibility and auto-recovery behavior for the local/docker-compose deployment setup.

Changes:

  • Add restart: unless-stopped to all services.
  • Add Compose healthcheck definitions for presidio-anonymizer, presidio-analyzer, and presidio-image-redactor.
  • Minor cleanup/normalization of the existing ollama service stanza.

Comment thread docker-compose.yml
Comment thread docker-compose.yml
Comment thread docker-compose.yml
@SharonHart SharonHart merged commit 526bc80 into data-privacy-stack:main Jul 13, 2026
33 checks passed
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