title: Git repository setup for a Docker application consisting of multiple repositories
body: <p>Given the following structure;</p>
  
  <pre><code>├── api/                - A PHP application, to have its own repository
  ├── docker/             - Docker configuration for shared containers (MySQL, Nginx)
  ├── docker-compose.yml  - Defines all of the services
  └── web-client/         - A standalone Angular application, to have its own repository
  </code></pre>
  
  <p>Currently the entire application is in one repository but I am looking to split into separate repositories. Development has not started so there is no issue with maintaining any history etc.</p>
  
  <p>Firstly, is defining all of the services in a root level <code>docker-compose</code> file the best way to go about this, or should the <code>api</code> and <code>web-client</code> be more isolated with their own <code>docker-compose</code>, thus managed completely separately? If separate, is it possible to still have one "<code>depends_on</code>" another?</p>
  
  <p>Secondly, what is the best way to manage repositories for this? The root level code (<code>docker-compose.yml</code> and <code>docker/</code>) should exist in one repository, but that also depends on the other two repositories being present, presumably as children. I looked into git submodules for this but it seems as though the parent repository has to be tied to specific commits in the children, which may make working on multiple parallel features difficult?</p>