title: Docker Compose Wait til dependency container is fully up before launching
body: <p>I'm working with a docker service using docker-compose, and I have a service that depends on anther. </p>
  
  <p>I've used the <code>depends_on</code> key, but the service with the dependency launches prior to the depending service being completely up. </p>
  
  <pre><code>version: '3'
  
  services:
    KeyManager:
      image: cjrutherford/keymanager
      deploy:
        replicas: 1
      ports:
        - '3220:3220'
      networks:
        - privnet
    YellowDiamond:
      image: cjrutherford/server
      depends_on:
        - KeyManager
      deploy:
        replicas: 1
      ports:
        - '3000:3000'
      networks:
        - privnet
        - web
  networks:
    privnet:
      internal: true
    web:
  </code></pre>
  
  <p>Both of these are node applications, and the keymanager is required to be running to accept requests before the server launches. Can I add a timeout? or send a trigger in the app? it's just launching way too early to get the key from the manager.</p>