Skip to content

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

Open
hiro-nikaitou wants to merge 1 commit into
data-privacy-stack:mainfrom
hiro-nikaitou:fix/docker-compose-healthcheck-restart
Open

[Chore] Add healthcheck and restart policy to docker-compose.yml#2149
hiro-nikaitou wants to merge 1 commit into
data-privacy-stack:mainfrom
hiro-nikaitou:fix/docker-compose-healthcheck-restart

Conversation

@hiro-nikaitou

Copy link
Copy Markdown

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

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

1 participant