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==

访问
http://192.168.99.100:8500/ui...
图片描述

doc


codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...


引用和评论

0 条评论