##docker-compose
version: '2'services: node-1: image: shcoder/alpine-consul hostname: node-1 ports: - 8500:8500 environment: - CONSUL_NODE_NAME=node-1 - CONSUL_BOOTSTRAP_EXPECT=3 - CONSUL_SERVER=true - CONSUL_CLUSTER_IPS=node-2,node-3 - CONSUL_ENCRYPT=q7Gsg6LSdrtWFvBpw7vmdA== node-2: image: shcoder/alpine-consul hostname: node-2 environment: - CONSUL_NODE_NAME=node-2 - CONSUL_BOOTSTRAP_EXPECT=3 - CONSUL_SERVER=true - CONSUL_CLUSTER_IPS=node-1,node-3 - CONSUL_ENCRYPT=q7Gsg6LSdrtWFvBpw7vmdA== node-3: image: shcoder/alpine-consul hostname: node-3 environment: - CONSUL_NODE_NAME=node-3 - CONSUL_BOOTSTRAP_EXPECT=3 - CONSUL_SERVER=true - CONSUL_CLUSTER_IPS=node-1,node-2 - CONSUL_ENCRYPT=q7Gsg6LSdrtWFvBpw7vmdA==
访问
##doc