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?

  • Creating multiple Docker container
  • Docker and Eureka with Spring Boot failing to register clients
  • Maven build with parameter somehow cache parameter in war?
  • Cannot get image on Docker - Network timed out [Windows]
  • Docker Rails App and postgres
  • Docker Compose 3 controlling resources (memory, cpu)
  • My containers:

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

  • java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing
  • Bind to docker socket on Windows
  • How to scale application with multiple exposed ports and multiple volume mounted by using docker swarm?
  • Docker flask application environment variables
  • Compose two Docker image into one : NodeJS and MongoDB
  • Docker process not starting in the background
  • 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.