Bellow the very first skeleton to be used to create a couchDb cluster with 3 docker containers * all files should be in ''couchdb_cluster'' directory - if not, NODENAME should be updated to use the FQDN based on default docker compose network. * docker-compose.yml version: "3" services: node1: image: couchdb:2.1.1 environment: - NODENAME=node1.couchdbcluster_default - COUCHDB_USER=admin - COUCHDB_PASSWORD=admin ports: - "5981:5984" node2: image: couchdb:2.1.1 environment: - NODENAME=node2.couchdbcluster_default - COUCHDB_USER=admin - COUCHDB_PASSWORD=admin ports: - "5982:5984" node3: image: couchdb:2.1.1 environment: - NODENAME=node3.couchdbcluster_default - COUCHDB_USER=admin - COUCHDB_PASSWORD=admin ports: - "5983:5984" * initCluster.sh curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"admin", "node_count":"3"}' curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"admin", "port": 5984, "node_count": "3", "remote_node": "couchdb@node2.couchdbcluster_default", "remote_current_user": "admin", "remote_current_password": "admin" }' curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "add_node", "host":"node2.couchdbcluster_default", "port": "5984", "username": "admin", "password":"admin"}' curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"admin", "port": 5984, "node_count": "3", "remote_node": "couchdb@node3.couchdbcluster_default", "remote_current_user": "admin", "remote_current_password": "admin" }' curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "add_node", "host":"node3.couchdbcluster_default", "port": "5984", "username": "admin", "password":"admin"}' curl -X POST -H "Content-Type: application/json" http://admin:admin@tm171lin209.wls.ro.alcatel-lucent.com:5981/_cluster_setup -d '{"action": "finish_cluster"}' * checkCluster.sh curl -X GET "http://admin:admin@localhost:5981/_membership" curl -X GET "http://admin:admin@localhost:5982/_membership" curl -X GET "http://admin:admin@localhost:5983/_membership" * example or running the cluster - commands to be executed in ''couchdb_cluster'' directory: docker-compose up -d sh initCluster.sh sh checkCluster.sh