Running an Elasticsearch cluster on Docker 1.9 with Swarm and Compose
Yoanis Gil Delgado


You cannot do:

- "affinity:container!=*master*"
- "affinity:container!=*es-node*"

Only the later one takes effect as you are setting the same environment variable twice.
The proper syntax is:

- "affinity:container!=*es-node_*|es_master*"

Otherwise the cluster nodes might end up on the same host with master node.

Like what you read? Give Mariusz Woloszyn a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.