简体   繁体   中英

Deploying many services: many docker-compose.yml or one 'master' docker-compose.yml?

I'm deploying a few web services in docker.

Each is already containerized and can run independently.

Each consists of 2-3 services set up in a docker-compose file.

When deploying this to docker swarm, should I deploy each as a separate stack or create a master docker-compose file and deploy the entire system as a single stack?

I guess the real question is, what are the pros/cons of each method? I need to choose and I don't know what to base the decision on.

In my opinion it depends if your service have any sens with others services. One apache with one php appli and a database make sense in a compose file. If someday you want to start just one application, but it's in a big compose file, it will be difficult.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM