Docker Swarm load balancing and HEALTHCHECKs

I have a some applications that can take anything from a couple of secs to a minute (loads data from DB into memory before starting up proper)

I was playing with Docker Swarm and its internal load balancing. is there any way swarm can wait until the HEALTHCHECK is OK before adding them into the LB?

Currently if you have 1 node and add 5 for example, 4 in 5 requests will fail until those applications come online.

These are currently the main restriction to me pushing out all of our applications in Docker (the devs already have them ready to go and are jumping at the chance) But i need the deploys to be as stable and reliable as possible with no outages when scaling / deploying

I haven’t tried but the –start-period=DURATION flag (can be used in docker-compose.yml too) might help, documented here.