{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/686","labels_url":"https://api.github.com/repos/docker/compose/issues/686/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/686/comments","events_url":"https://api.github.com/repos/docker/compose/issues/686/events","html_url":"https://github.com/docker/compose/pull/686","id":50481573,"number":686,"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.","user":{"login":"gilclark","id":4210679,"avatar_url":"https://avatars.githubusercontent.com/u/4210679?v=3","gravatar_id":"","url":"https://api.github.com/users/gilclark","html_url":"https://github.com/gilclark","followers_url":"https://api.github.com/users/gilclark/followers","following_url":"https://api.github.com/users/gilclark/following{/other_user}","gists_url":"https://api.github.com/users/gilclark/gists{/gist_id}","starred_url":"https://api.github.com/users/gilclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilclark/subscriptions","organizations_url":"https://api.github.com/users/gilclark/orgs","repos_url":"https://api.github.com/users/gilclark/repos","events_url":"https://api.github.com/users/gilclark/events{/privacy}","received_events_url":"https://api.github.com/users/gilclark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2014-12-01T02:25:48Z","updated_at":"2015-06-18T18:18:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/compose/pulls/686","html_url":"https://github.com/docker/compose/pull/686","diff_url":"https://github.com/docker/compose/pull/686.diff","patch_url":"https://github.com/docker/compose/pull/686.patch"},"body":"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.\r\n\r\nFor 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.\r\n\r\n```yaml\r\nweb:\r\n  image: webimage\r\n  net: \"container:network\"\r\n  depends_on:\r\n    - app\r\napp:\r\n  image: appimage\r\n  net: \"container:network\"\r\n  depends_on:\r\n    - db\r\ndb:\r\n  image: dbimage\r\n  volumes_from:\r\n    - data\r\n  ports:\r\n    - 1529:1529\r\ndata:\r\n  image: dataimage\r\n  volumes: /foo\r\n```\r\nThe 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."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/113245462","html_url":"https://github.com/docker/compose/pull/686#issuecomment-113245462","issue_url":"https://api.github.com/repos/docker/compose/issues/686","id":113245462,"user":{"login":"pikeas","id":686573,"avatar_url":"https://avatars.githubusercontent.com/u/686573?v=3","gravatar_id":"","url":"https://api.github.com/users/pikeas","html_url":"https://github.com/pikeas","followers_url":"https://api.github.com/users/pikeas/followers","following_url":"https://api.github.com/users/pikeas/following{/other_user}","gists_url":"https://api.github.com/users/pikeas/gists{/gist_id}","starred_url":"https://api.github.com/users/pikeas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pikeas/subscriptions","organizations_url":"https://api.github.com/users/pikeas/orgs","repos_url":"https://api.github.com/users/pikeas/repos","events_url":"https://api.github.com/users/pikeas/events{/privacy}","received_events_url":"https://api.github.com/users/pikeas/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T18:18:05Z","updated_at":"2015-06-18T18:18:05Z","body":"@gilclark What about the part of the PR that treats volumes_from as a dependency?"}}