Not all of the containers are related but it has been set up this way
so I could just run docker-compose up once
If you keep all the container in single docker-compose.yml
file for the sake of this need, so then better to go for One project per docker-compose file instead creating all containers. as you can start multiple compose file at once also.
If you want to start all container then just pass
docker-compose -f docker-compose.projecta.yml -f docker-compose.projectb.yml up
Or for a single project
docker-compose -f docker-compose.projecta.yml
You can also explore extend option
Share Compose configurations between files and projects
I will go for One project per docker-compose file because
- It will not create unnecessary container
- It will avoid port conflict ( in case two sharing same port)
- Will save compute cost
- Less time to create a docker-compose stack
- More manageable
And the last when validating compose file is really messy as no proper line indication when there is error, so configuration error will only propagate to single project and it will not affect all the other project.