Source controlling (git) docker-compose.yml

My docker-compose.yml file orchestrates the containers for a PHP API based app and a Nodejs web frontend. Both of these are in seperate git repos.

Question: Where and how should I check my docker-compose.yml file into git?

  • Can't change repo in discourse docker
  • systemctl from inside docker container fails with D-Bus connection error
  • Cloud9 - is there a way to use ssh workspaces with standalone?
  • Containers network error when use docker with live-restore
  • Stylesheet served from nginx in docker not available on page
  • Why does chown increase size of docker image?
  • My containers:

    • Nginx
    • Redis
    • MySQL
    • Nodejs App
    • PHP App

  • Cannot login with wp-cli generated user wordpress behind reverse proxy
  • Running Nightwatch test inside docker - Selenium server doesn't start
  • How to know whether a layer exists locally on docker 1.10+
  • Linking containers in Docker
  • How do I restart a Docker container/image/machine?
  • Edit source code in Docker
  • One Solution collect form web for “Source controlling (git) docker-compose.yml”

    I think that I’ve accidentally answered to this question in other thread: https://stackoverflow.com/a/34001663/381939 (perhaps it is a partial answer)

    Anyway, for a situation similar to yours, I have a separate repository for deployment related scripts and configuration. Also, I use git submodules for linking the application repositories into the deployment repo.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.