How can we control the startup order of services in Docker compose?

In Docker compose we can use the depends on the option to control the startup order of services. With compose, the services will start in the dependency order. Dependencies can be defined in the options like- depends_on, links, volumes_from, network_modeetc. But Docker does not wait until the container is ready.