Skip to content

Instantly share code, notes, and snippets.

@davedash
Created October 21, 2016 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davedash/f7e40276cc7ea05235ded8d3d720214f to your computer and use it in GitHub Desktop.
Save davedash/f7e40276cc7ea05235ded8d3d720214f to your computer and use it in GitHub Desktop.
version: '2'
services:
consul1:
image: "consul:latest"
container_name: "consul1"
hostname: "consul1"
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
command: "agent -server -bootstrap-expect 3 -client 0.0.0.0 -ui"
consul2:
image: "consul:latest"
container_name: "consul2"
hostname: "consul2"
expose:
- "8400"
- "8500"
- "8600"
command: "agent -server -join consul1"
depends_on:
- consul1
consul3:
image: "consul:latest"
container_name: "consul3"
hostname: "consul3"
expose:
- "8400"
- "8500"
- "8600"
command: "agent -server -join consul1"
depends_on:
- consul1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment