I'm looking for best practices to share the Docker compose files created by developers with the people that do the deployment.
We use 2 docker compose files:
These files are included in version control (git in our case).
We have 2 options:
- Include the compose files in the master branch, and checkout the entire master branch when the application needs to be deployed. Pro here is that it is easy to keep everything in sync, con that the entire projects needs to be cloned on the server when the application is deployed.
- Include the compose files in a orphaned branch that can be checked out when the application needs to be deployed. The pro here is that only the compose files will be checked out, con that we have 2 branches that needs to be maintained.
Since we are fairly new to this, I'm wondering how other organizations approach this, and why one method should be preferred over the other?