Created
August 16, 2017 13:32
-
-
Save kelchm/9f7e171d4c5da31a87928bd54cfe0091 to your computer and use it in GitHub Desktop.
Consul Sample
This file contains 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: '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 |
This file contains 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: '2' | |
services: | |
consul: | |
scale: 3 | |
start_on_create: true | |
consul-seed: | |
scale: 1 | |
start_on_create: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This didn't work for me :(