github.com/kjdelisle/consul@v1.4.5/demo/docker-compose-cluster/docker-compose.yml (about)

     1  version: '3'
     2  
     3  services:
     4  
     5    consul-agent-1: &consul-agent
     6      image: consul:latest
     7      networks:
     8        - consul-demo
     9      command: "agent -retry-join consul-server-bootstrap -client 0.0.0.0"
    10  
    11    consul-agent-2:
    12      <<: *consul-agent
    13  
    14    consul-agent-3:
    15      <<: *consul-agent
    16  
    17    consul-server-1: &consul-server
    18      <<: *consul-agent
    19      command: "agent -server -retry-join consul-server-bootstrap -client 0.0.0.0"
    20  
    21    consul-server-2:
    22      <<: *consul-server
    23  
    24    consul-server-bootstrap:
    25      <<: *consul-agent
    26      ports:
    27        - "8400:8400"
    28        - "8500:8500"
    29        - "8600:8600"
    30        - "8600:8600/udp"
    31      command: "agent -server -bootstrap-expect 3 -ui -client 0.0.0.0"
    32  
    33  networks:
    34    consul-demo: