-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hey,
The documentation states:
Services are updated in lexicographical order (by Unicode code point),
regardless of dependencies.
I see this is intentional, but could you please add an ability to deploy containers by dependency order.
For example, for the following docker-compose file:
services:
website-frontend-react:
...
website-backend-tasks:
...
website-backend-service:
...
deploy:
replicas: 2
update_config:
parallelism: 1
order: start-first
failure_action: rollback
delay: 20s
depends_on:
- website-backend-tasks
The deploy order if in lexicographic order would be:
- website-frontend-react
- website-backend-service
- website-backend-tasks
In my case, it's an issue because the thing website-backend-tasks do is run db migrations. So it prepares the DB before the new website-backend-service can boot, because if it would boot before the migrations, it would run on new queries but the db is not prepared.
Also, as a side effect of the new website-backend-service container running new queries without migrations, it's not healthy, so the deployment fails, which prevents it from continuing to the next service, which in my case is the one they would fix everything, but the deployment stopped.
So without Kerek considering the depends_on, it's harder to make it work with this kind of architecture.
Can someone please add this ability?