Created
December 18, 2018 08:48
-
-
Save codeasashu/7037ccbe74606ded8a724976d50ab544 to your computer and use it in GitHub Desktop.
Yaml learning center
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
- "8600:8600/udp" | |
command: "agent -server -bootstrap-expect 3 -ui -client 0.0.0.0" | |
networks: | |
consul-demo: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment