The very first docker rollout service seems to ignore the healthcheck:
$ docker rollout foo
==> Service 'foo' is not running. Starting the service.
Network _example_default Creating
Network _example_default Created
Volume "example_foo-mysql" Creating
Volume "example_foo-mysql" Created
Container example-foo-mysql-1 Creating
Container example-foo-mysql-1 Created
Container example-foo-1 Creating
Container example-foo-1 Created
Container example-foo-mysql-1 Starting
Container example-foo-mysql-1 Started
Container example-foo-mysql-1 Waiting
Container example-foo-mysql-1 Healthy
Container example-foo-1 Starting
Container example-foo-1 Started
You can see that the foo service depends_on the foo-mysql service to be healthy and waits for that. But the foo service itself is only started, without waiting for it to be healthy. And this indeed leads to the docker rollout command to finish even though the foo service is not yet ready to receive requests. In this case accessing the service (via Traefik in this case) yields a 404 until it becomes healthy eventually.
The very first
docker rollout serviceseems to ignore thehealthcheck:You can see that the
fooservicedepends_onthefoo-mysqlservice to be healthy and waits for that. But thefooservice itself is onlystarted, withoutwaitingfor it to behealthy. And this indeed leads to thedocker rolloutcommand to finish even though thefooservice is not yet ready to receive requests. In this case accessing the service (via Traefik in this case) yields a 404 until it becomes healthy eventually.