Created
April 8, 2017 10:49
-
-
Save mwaaas/03559bf7dac944d0951842b07a00a645 to your computer and use it in GitHub Desktop.
docker-stack.yml traefik path prefix example
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: | |
lb: | |
image: traefik:latest | |
command: > | |
--web --docker --docker.swarmmode | |
--docker.domain=traefik --docker.watch | |
--accesslogsfile=/dev/stdout --logLevel=DEBUG | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- /dev/null:/traefik.toml | |
ports: | |
- "9000:80" | |
- "9001:8080" | |
deploy: | |
placement: | |
constraints: | |
- node.role == manager | |
nginx: | |
image: 'nginx' | |
deploy: | |
labels: | |
- "traefik.frontend.rule=PathPrefix:/" | |
- "traefik.backend=nginx" | |
- "traefik.port=80" | |
- "traefik.weight=5" | |
helloworld: | |
image: dockercloud/hello-world | |
deploy: | |
labels: | |
- "traefik.frontend.rule=PathPrefix:/hello/" | |
- "traefik.backend=hello" | |
- "traefik.port=80" | |
- "traefik.weight=7" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment