full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
depends_on is deprecated in docker-compose v3
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?
i just got this issue a few minitus ago, how to fix it ?
services.backend.depends_on must be a list
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 :)
using dc 3.7 and is working fine here. was not able to reproduce with 3.3 either.
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
i just got this issue a few minitus ago, how to fix it ?
services.backend.depends_on must be a listYou have to delete all
depends_onin yourdocker-compose.yml. As far as I know the are not mandatory for running :)
thanks,it works fine for me:)
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.
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.
following as docker stack seems to be missing Long syntax indeed
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