Skip to content

depends_on is deprecated in docker-compose v3 #273

@Koschi13

Description

@Koschi13

depends_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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions