Skip to content

Instantly share code, notes, and snippets.

@kelchm
Created August 16, 2017 13:32
Show Gist options
  • Save kelchm/9f7e171d4c5da31a87928bd54cfe0091 to your computer and use it in GitHub Desktop.
Save kelchm/9f7e171d4c5da31a87928bd54cfe0091 to your computer and use it in GitHub Desktop.
Consul Sample
version: '2'
services:
consul:
image: consul:latest
stdin_open: true
tty: true
ports:
- 8500/tcp
command:
- consul
- agent
- -server
- -data-dir=/tmp/consuldata
- -client=0.0.0.0
- -retry-join=consul-seed
- -ui
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=consul
consul-seed:
image: consul:latest
stdin_open: true
tty: true
command:
- consul
- agent
- -server
- -bootstrap-expect=3
- -data-dir=/tmp/consuldata
labels:
io.rancher.container.pull_image: always
version: '2'
services:
consul:
scale: 3
start_on_create: true
consul-seed:
scale: 1
start_on_create: true
@Nuxij
Copy link

Nuxij commented Mar 14, 2018

This didn't work for me :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment