version: '3.7' services: consul1: image: consul # restart: always ports: - "8500:8500" command: "agent -server -client 0.0.0.0 -bootstrap-expect 3 -node consul1 -ui -bind 0.0.0.0" consul2: image: consul # restart: always command: "agent -server -client 0.0.0.0 -retry-join=consul1 -node consul2 -bind 0.0.0.0" consul3: image: consul # restart: always command: "agent -server -client 0.0.0.0 -retry-join=consul1 -node consul3 -bind 0.0.0.0"