Docker Compose restart policies and healthchecks

If you’ve been digging into the rabbit hole of Docker Compose healthchecks and restart policies, or maybe got a bit confused by my previous posts, you’ve probably wondered: “Can I use restart policies to restart containers when they become unhealthy?” tldr: By default, nope, not out of the box. Yet, you can make it work by implementing some application logic to it. restart policies Currently there are 4 restart policies: ...

July 7, 2025