docker/fig — pull request #686 by gilclark (2014-12-01 02:25:48+00:00)
Title: Allow volumes_from, network using containers (pre-existing or in fig project), and links to be treated as dependencies.  Also, allow dependencies to be specified explicitly.

Currently services are started in the order defined by links between services. We also need services that will share volumes to be started in the right order. And the net: container:foo statement should be recognized as a project service to be started in the right order and with the proper container name being passed to the using services. Finally, dependencies need to be explicitly called out even if the services don't use links, volumes_from, net, etc. from each other so that if ordering of service start up is needed it happens correctly.

For example, with this fig.yml file, we will be guaranteed that the data container starts before the db container which starts before the app container which starts before the web container. And the network container will start before all the rest and it's container id will be properly passed to the using containers. This allows the "kubernetes pod" type system to be set up easily which was hard to set up with fig before.
web:
image: webimage
net: "container:network"
depends_on:
- app
app:
image: appimage
net: "container:network"
depends_on:
- db
db:
image: dbimage
volumes_from:
- data
ports:
- 1529:1529
data:
image: dataimage
volumes: /foo

The internals of dependency management have been modified quite a bit with most changes to service.py and project.py. The unit and integration tests have been modified to check that it all works.