I'm running a docker swarm to handle one application that needs to be always available but only run on one node at the time. If the application is running twice, it crashes on both nodes.
I was using docker swarm to realize that and for the most part it works perfectly, but recently I ran into the problem that docker decided to replicate the application 2 times.
ID NAME MODE REPLICAS IMAGE PORTS
qro2usyj798l cmdr_cmdr replicated 2/1 some-name
As you can see the odd thing is that it knows it replicates more than it should.
Is there a way to force docker to only ever replicate maximum 1 instance.