Category: docker

Problem

Add health check to Dockerfile.

Solution

  HEALTHCHECK CMD curl -f http://localhost:8000/health || exit 1
  

Notes

  • Adapt variable names and paths to your project
  • Add error handling for production use
  • See related chapters in the Learning Path