Docker Compose healthcheck depends_on Condition Not Working: Why Your Container Starts Before Postgres Is Ready in 2026
Docker Compose healthcheck depends_on Condition Not Working: Why Your Container Starts Before Postgres Is Ready in 2026 Your app container crashes with ECONNREFUSED 127.0.0.1:5432 even though you set depends_on: postgres: condition: service_healthy, and the fix is almost always one of three things: you are on a Compose file format older than 2.1, your healthcheck block…