Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Traefik example
version: '3'
services:
whoami:
image: stefanscherer/whoami
labels:
# Create a router called whoami listening on the websecure entrypoint
- "traefik.http.routers.whoami.entrypoints=websecure"
# Force TLS
- "traefik.http.routers.whoami.tls=true"
# Apply a host rule specifying the domain the service will respond to
- "traefik.http.routers.whoami.rule=Host(`whoami.mydomain.com`)"
# Send traffic to the container via port 8080
- "traefik.http.services.whoami-service.loadbalancer.server.port=8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment