depends_on is deprecated in docker-compose v3
See original GitHub issuedepends_on does not longer wait for the container to be “ready” instead it will wait for it to be started. To make sure a container is ready one should have a try again loop.
I experienced issues when deploying this, with the deploy script:
services.pgadmin.depends_on must be a list
I don’t know why nobody else had this problem, but for me everything works fine when removing the depends_on lines. This seems to be the expected behavior as stated in the docs:
There are several things to be aware of when using depends_on:
- depends_on does not wait for db and redis to be “ready” before starting web - only until they have been started. If you need to wait for a service to be ready, see Controlling startup order for more on this problem and strategies for solving it.
- Version 3 no longer supports the condition form of depends_on.
- The depends_on option is ignored when deploying a stack in swarm mode with a version 3 Compose file.
Did someone else had this problem? Is it save to remove the depends_on lines?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:16
- Comments:8
Top Results From Across the Web
Compose file version 3 reference - Docker Documentation
Reference and guidelines . These topics describe version 3 of the Compose file format. This is the newest version. Compose and Docker...
Read more >What is the alternative to condition form of depends_on in ...
The current docker-compose documentation states: Version 3 no longer supports the condition form of depends_on. Unfortunately the documentation ...
Read more >Getting back 'depends_on' in docker-compose - LinkedIn
... depends_on not only doesn't wait for other services to start but it's also been deprecated in docker-compose version 3.
Read more >Docker Compose: Wait for Container X Before Starting Y
Thus, the client depends on the server. ... The version tag is deprecated after Docker Compose version 3, but it's required in all...
Read more >fabric8io/docker-maven-plugin
3. Global configuration. Global configuration parameters specify overall behavior like ... This option is deprecated, please use imagePullPolicy instead.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
following as
docker stackseems to be missing Long syntax indeedYou have to delete all
depends_onin yourdocker-compose.yml. As far as I know the are not mandatory for running 😃