docker-compose


should I do with docker-compose? when I have 2 project


I'm having 2 project
A {mysql, redis, rails}
B {mysql, redis, rails}
should I do
create a docker-compose.yml file with a MySql, a redis, rails1, rails2
or
create 2 docker-compose.yml file with each is a Mysql, a Redis, rails
help me!
You could create a docker-compose.yml file with your common services. And then create two project specific composer files which inherits the root composer file.
docker-compose.project.template.yml
services:
mysql:
....
docker.compose.project.a.yml
services:
mysql:
extends:
file: docker-compose.project.template.yml
service: mysql
...
Another option is to create a general project docker-compose.yml file and use environment variables to customize the behaviour.

Related Links

Docker compose: doesnt allow to use constraints if you have a env variable set
How to use visual studio docker function on Windows Home edition?
Passing arguments to docker compose file when using it for swarm
How to run ad hoc docker compose commands in Ansible?
Using custom hostnames for docker local development containers
Changing the network name?
Let external container know about subnets created by multiple docker-compose projects
How to monitor / discover more docker containers with prometheus
two docker-compose .yml in the same network with COMPOSE_PROJECT_NAME
docker compose 3.1(swarm), secrets, ssl and nginx
What is the version directive for?
How to run docker-compose up -d at system start up?
In Docker Compose can I have services exiting
Docker compose - secrets Additional property secrets is not allowed
docker-compose mounted volume remain
Should I do anything after upgrading docker-compose?

Categories

HOME
gcc
ckan
url
ide
locale
snappy
casting
aix
dynamic
gaussian
spss
okhttp3
redhawksdr
sugarcrm
travis-ci-cli
ethereum
activejdbc
javascript-debugger
jinja2
url-parameters
keystone
infinite-loop
bootstrap-accordion
scrapy-spider
jopendocument
typeclass
csproj
kundera
2checkout
edirectory
apm
exacttarget
flickr
extern
wicket-tester
compiled-query
mtm
smooth-streaming
python-venv
gradlew
ocamlbuild
xmldom
emacs24
ng-class
serialversionuid
px4
android-vectordrawable
liferay-ide
overhead
disassembly
group
blitz3d
boost-range
queuing
boost-bind
transaction-isolation
jmh
web-optimization
firefox-os
jsondoc
dday
videoview
google-finance-api
google-app-engine-php
traminer
textblob
web-standards
opennebula
firebase-tools
chrome-mobile
mathics
esri-arc-engine
javadb
go-gin
famous-engine
behance-api
class-library
windows-phone-store
xml-validation
myrrix
ironworker
violation
usersettings
android-library
friendly-url
azure-scheduler
magicsuggest
antixsslibrary
yii-components
openafs
doxia
custom-cursor
databus
blackberry-eclipse-plugin
event-propagation
bash4
parsec
jqueryi-ui-buttonset
unordered-set
ruby-1.9
umfpack
youtube.net-api
marathontesting
table-valued-parameters
numerical-computing
qlibrary
urlscan

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App