[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends_on is deprecated in docker-compose v3 #273

Open
Koschi13 opened this issue Sep 21, 2020 · 9 comments
Open

depends_on is deprecated in docker-compose v3 #273

Koschi13 opened this issue Sep 21, 2020 · 9 comments

Comments

@Koschi13
Copy link

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?

@jackleeforce
Copy link

i just got this issue a few minitus ago, how to fix it ?

services.backend.depends_on must be a list

@Koschi13
Copy link
Author

i just got this issue a few minitus ago, how to fix it ?

services.backend.depends_on must be a list

You have to delete all depends_on in your docker-compose.yml. As far as I know the are not mandatory for running :)

@haviduck
Copy link
haviduck commented Sep 21, 2020

using dc 3.7 and is working fine here. was not able to reproduce with 3.3 either.

@Koschi13
Copy link
Author

ok, what are your versions, mine are:

  • docker: Docker version 19.03.12, build 48a66213fe
  • docker-compose: docker-compose version 1.27.3, build unknown
  • system: Linux 4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 2020

@jackleeforce
Copy link

i just got this issue a few minitus ago, how to fix it ?

services.backend.depends_on must be a list

You have to delete all depends_on in your docker-compose.yml. As far as I know the are not mandatory for running :)

thanks,it works fine for me:)

@kmatarese
Copy link

Same problem here. Running on a mac, versions for reference:

Docker:

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:07:04 2020
  OS/Arch:          linux/amd64
  Experimental:     true

Docker Compose:

docker-compose version 1.27.4, build 40524192

Removing depends_on works around the issue for me too.

paxcodes pushed a commit to paxcodes/dicery_backend that referenced this issue Feb 23, 2021
Getting error when deploy
'services.backend.depends_on must be a list'

tiangolo/full-stack-fastapi-template#273
@mulder999
Copy link

Long syntax does not not seems deprecated according to latest docker compose specification but clearly not implemented with docker stack for me either. Only the short syntax is working.

@Ren22
Copy link
Ren22 commented Jun 8, 2022

following as docker stack seems to be missing Long syntax indeed

Nonameentered added a commit to Pinafore/karl-flashcards-web-app that referenced this issue Jun 22, 2022
@diegobill
Copy link

The depends_on option is ignored when deploying a stack in swarm mode with a version 3 Compose file.

Reference: https://docs.docker.com/compose/compose-file/compose-file-v3/#depends_on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@diegobill @mulder999 @jackleeforce @haviduck @Ren22 @Koschi13 @kmatarese and others