I am using an application which run on 3 different dockers:
- The first one is the server HTTP callable with a REST API
- The second one is rabbitmq
- The third one is a worker
The whole application is launched with docker-compose up
Really simple :)
I would like to make it scalable and run multiple instances of this entire application (the 3 docker images) independently of the others, and then put a load balancer like haproxy
which will redirect to one of the applications.
I saw that I can use docker-compose up --scale blablabla
however the problem with this is that I can scale containers, but I really want to keep the different "application" independent.
For example if I want 3 version of the app I will have 9 dockers images etc.
I saw that we can run docker inside docker with --privilege
(allowing me to create one docker with the 3 dockers inside) but I read on Stack Overflow that it is not a suitable solution.
Do you have a solution? Or at least some documents to read.
I heard that Kubernetes could be a solution but I am not sure. I read (on stack)
question from:https://stackoverflow.com/questions/43957259/run-multiple-docker-composeIf you need multiple containers tightly bound, you may want to look at Kubernetes that runs docker inside their "pods"