esl / mongooseim-docker

Apache License 2.0
27 stars 29 forks source link

Add an option to not clusterize nodes on startup #20

Closed arkgil closed 5 years ago

michalwski commented 6 years ago

Thanks for the PR @arkgil, this make sense. Could you add a short description of this option to the README.md file?

michalwski commented 6 years ago

I've just recalled #4 PR where we had the idea to add CLUSTER_WITH var. I imagine this could work like this:

  1. If the CLUSTER_WITH is not set, the current behaviour happens
  2. If the CLUSTER_WITH is set to false, there is no clustering at all
  3. If the CLUSTER_WITH is set to anything else, the script tries to cluster with then node passed in the var.

What do you think @arkgil? Does it make sense? Would you find some time to implement this (if it makes sens).

arkgil commented 6 years ago

@michalwski thanks for the review :) Yes, it does make sense. I'm all for making the clustering behaviour more controllable.

arkgil commented 6 years ago

@michalwski I think that we need additional portion of explicitness, i.e. CLUSTER_WITH will point at node with whom the starting node will try to clusterize (we'll keep the default the same as current CLUSTER_NODE), but I'd also add JOIN_CLUSTER variable (true by default) which will determine if clustering will be attempted at all.

michalwski commented 6 years ago

@arkgil yes, that'd be simpler and clearer. Good idea.

arkgil commented 6 years ago

@michalwski done 🙂

arkgil commented 6 years ago

@michalwski yes I have and it's working as expected. I've also removed --add-host solution and instead used a dedicated Docker network + container names.