Skip to content

Instantly share code, notes, and snippets.

@miyu4u
Last active January 14, 2020 23:47
Show Gist options
  • Save miyu4u/c127d4d7facb7f2e0bc5786ae8e29c92 to your computer and use it in GitHub Desktop.
Save miyu4u/c127d4d7facb7f2e0bc5786ae8e29c92 to your computer and use it in GitHub Desktop.
deploy test container with traefik docker swarm
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