Scaling up persistent named volumes in docker-compose

Viewed 1015

I am trying to scale using docker-compose to create multiple nodes of elasticsearch. I was using a named container for the first node but when scaling up these different nodes were all using the same volume which led to read-write conflicts.

Then I tried using anonymous volumes, but I've read that these are disregarded. And when I run docker-compose down and then up, the existing anonymous volumes are not reused and instead new ones are created.

So my question is, how can I scale up containers with separate persistent volumes?

In another SO question something similar is being asked, but hasn't been answered yet.

For reasons of complexity I am not yet prepared to run in swarm mode.

0 Answers
Related