2018-01-19 20:54:44 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
consul-agent-1: &consul-agent
|
|
|
|
image: consul:latest
|
|
|
|
networks:
|
|
|
|
- consul-demo
|
|
|
|
command: "agent -retry-join consul-server-bootstrap -client 0.0.0.0"
|
|
|
|
|
|
|
|
consul-agent-2:
|
|
|
|
<<: *consul-agent
|
|
|
|
|
|
|
|
consul-agent-3:
|
|
|
|
<<: *consul-agent
|
|
|
|
|
|
|
|
consul-server-1: &consul-server
|
|
|
|
<<: *consul-agent
|
|
|
|
command: "agent -server -retry-join consul-server-bootstrap -client 0.0.0.0"
|
|
|
|
|
|
|
|
consul-server-2:
|
|
|
|
<<: *consul-server
|
|
|
|
|
|
|
|
consul-server-bootstrap:
|
|
|
|
<<: *consul-agent
|
|
|
|
ports:
|
|
|
|
- "8400:8400"
|
|
|
|
- "8500:8500"
|
|
|
|
- "8600:8600"
|
2018-05-30 04:56:56 +00:00
|
|
|
- "8600:8600/udp"
|
2018-01-19 20:54:44 +00:00
|
|
|
command: "agent -server -bootstrap-expect 3 -ui -client 0.0.0.0"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
consul-demo:
|