标签:client com image bootstrap volumes depends node nbsp 启动
version: ‘2.0‘
services:
consul-server1:
image: consul:latest
hostname: "consul-server1"
ports:
- "8501:8500"
volumes:
- ./consul/data1:/consul/data
command: "agent -server -bootstrap-expect 3 -ui -disable-host-node-id -client 0.0.0.0"
consul-server2:
image: consul:latest
hostname: "consul-server2"
ports:
- "8502:8500"
volumes:
- ./consul/data2:/consul/data
command: "agent -server -ui -join consul-server1 -disable-host-node-id -client 0.0.0.0"
depends_on:
- consul-server1
consul-server3:
image: consul:latest
hostname: "consul-server3"
ports:
- "8503:8500"
volumes:
- ./consul/data3:/consul/data
command: "agent -server -ui -join consul-server1 -disable-host-node-id -client 0.0.0.0"
depends_on:
- consul-server1
consul-node1:
image: consul:latest
hostname: "consul-node1"
command: "agent -join consul-server1 -disable-host-node-id"
depends_on:
- consul-server1
consul-node2:
image: consul:latest
hostname: "consul-node2"
command: "agent -join consul-server1 -disable-host-node-id"
depends_on:
- consul-server1
标签:client com image bootstrap volumes depends node nbsp 启动
原文地址:https://www.cnblogs.com/dongbo/p/10851876.html