How to make sure that a service is up and running

Hello!
I try to create a continuous delivery pipeline that uses docker swarm mode and docker stack to deploy services. What is the best practices exist to make sure that a service is up and running? I wanted to do docker service inspect and extract a status field, but there is not any status field. =)

Thank you!

you could check if the number of replicas is greater than 0.
would this work for you?

Yes, it’s a possible solution. =) But it would be nice if docker service ls (and docker service inspect includes a status field) show the health status that based on the health check.

Now, I think it doesn’t work if I have a service with 2 and more replicas and a delay between updates.