简体   繁体   English

源代码控制(git)docker-compose.yml

[英]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. docker-compose.yml文件编排了基于PHP API的应用程序和Nodejs Web前端的容器。 Both of these are in seperate git repos. 两者都在单独的git repos中。

Question: Where and how should I check my docker-compose.yml file into git? 问题: 我应该在哪里以及如何将docker-compose.yml文件检入git?

My containers: 我的容器:

  • Nginx Nginx的
  • Redis Redis的
  • MySQL MySQL的
  • Nodejs App Nodejs应用
  • PHP App PHP应用程序

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) 我认为我不小心在其他线程中回答了这个问题: https : //stackoverflow.com/a/34001663/381939 (也许这是部分答案)

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. 另外,我使用git子模块将应用程序存储库链接到部署存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .dockerignore 不忽略 docker-compose.yml - .dockerignore not ignoring docker-compose.yml docker-compose.yml问题nodejs和mysql - docker-compose.yml issue nodejs and mysql docker-compose.yml用于postgres遇到错误 - docker-compose.yml for postgres encountering error docker-compose.yml 中的绑定端口不起作用 - Bind port in docker-compose.yml doesn't work 移动 docker-compose.yml 文件时,Nginx 图像的 docker-compose 不起作用 - docker-compose of Nginx image doesn't work when the docker-compose.yml file is moved 在没有docker-compose.yml文件的单个docker文件中运行react和node - running react and node in a single docker file without docker-compose.yml file Docker-compose.yml 用于 NodeJs 和 MySQL on AWS Elastic Beanstalk 单容器 Docker - Docker-compose.yml for NodeJs with MySQL on AWS Elastic Beanstalk single container Docker Node.js 未在 Docker 中运行,我的 docker-compose.yml 是否正确? - Node.js is not running in Docker is my docker-compose.yml correct? 如何从docker-compose.yml获取端口或环境变量 - How can get ports or enviroment variable from docker-compose.yml 为什么我的节点容器会忽略我在docker-compose.yml中设置的环境变量? - Why does my node container ignore the environment variable I set in docker-compose.yml?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM