Last active
January 14, 2020 23:47
-
-
Save miyu4u/c127d4d7facb7f2e0bc5786ae8e29c92 to your computer and use it in GitHub Desktop.
deploy test container with traefik docker swarm
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: "3.6" | |
services: | |
cats: | |
image: mikesir87/cats | |
networks: | |
- proxy_entry | |
deploy: | |
replicas: 10 | |
labels: | |
traefik.docker.network: proxy_entry | |
traefik.protocol: http | |
traefik.backend: 123123 | |
traefik.frontend.rule: "Host: your.domain" | |
traefik.port: 5000 | |
traefik.backend.loadbalancer.swarm: "" | |
placement: | |
constraints: | |
- node.role == worker | |
whoami: | |
image: containous/whoami | |
networks: | |
- proxy_entry | |
deploy: | |
replicas: 20 | |
labels: | |
traefik.docker.network: proxy_entry | |
traefik.protocol: http | |
traefik.backend: whoami | |
traefik.frontend.rule: "Host: your.domain; PathPrefixStrip: /whoami" | |
traefik.port: 80 | |
traefik.backend.loadbalancer.swarm: "" | |
placement: | |
constraints: | |
- node.role == worker | |
networks: | |
proxy_entry: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment