How can I structure my docker projects for easy deployment?
<p>Right now I have multiple components of my application in the same folder linked together with a docker-compose
<a href="https://i.stack.imgur.com/ttTjP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ttTjP.png" alt="enter image description here"></a></p>

<p>This works really well in development, but when I want to push to production it's kind of fuzzy. If I keep this structure I cannot use only dockerhub to host my images because the docker-compose which links them will be missing. If I use git to pull down my docker-compose, what would be the point of dockerhub? Why not just clone my whole repo and run <code>docker-compose up</code> each time?</p>

<p>I could alternatively store each component separately in separate github repos, pushing them up to dockerhub when pushed to master. Then, simply combine them from the hub with a dockercompose. This seems less than ideal too, since one would have to clone and push to several different repos to make a change which effects the system.</p>

<p>How do you do it?</p>