re: How to Docker Compose a developer environment: an open source example VIEW POST

FULL DISCUSSION
 

Very nice article!
I was trying to do a similar setup and also ran into a problem with dependencies startup.
I still didn't have time but its worth looking into dockers health check feature
Looks like exactly what we need.
Maybe thats the next blog post?
πŸ˜‰

 

In version 2.1 of docker compose, there was a condition option on the depends_on which was removed on version 3.

The 3.0 version states:

β€œVersion 3 no longer supports the condition form of depends_on.β€œ

And points again to docs.docker.com/compose/startup-or...

So I think we are out of luck right now, but let me if you find a sensible way!

 

That is what Docker Compose v2.1 was using on the condition option on the depends_on, and that is what Docker Compose v3 removed.

Of course, I may be wrong, so by all means please investigate and let me know!

i think you're right about depends_on but we might be lucky with healthcheck:
docs.docker.com/compose/compose-fi...
(this will only tell us an indication if the container is healthy or not).
here's an example to try (docker not docker-compose):
github.com/tomwillfixit/healthcheck

also, i was trying to find depends_on with v3 out there in the wild and found this example:
github.com/Eficode/Docker-Selenium...

so i must say i'm confused.
i hope i'll have the time to play with it myself soon to figure it out

code of conduct - report abuse