title: Control startup order in Docker-Compose
body: <p>Is it possible to control the order of starting containers in Docker-compose beside the following method?</p>
  
  <p><a href="https://docs.docker.com/compose/startup-order/" rel="nofollow noreferrer">https://docs.docker.com/compose/startup-order/</a></p>
  
  <pre><code>version: "2"
  services:
    web:
      build: .
      ports:
        - "80:8000"
      depends_on:
        - "db"
      command: ["./wait-for-it.sh", "db:5432", "--", "python", "app.py"]
    db:
      image: postgres
  </code></pre>
  
  <p>I have a container which depends on a redis databse container. However, it takes longer for redis to load in memory which causes the first container to exit. For now, I am using always restart method to deal with the problem as a workaround. </p>
  
  <p>I was wondering if there is a better alternative as I would try to avoid the wait for it script? </p>