As described here, i use a label - "dev.gero.expose-internally=true" to tell one of my two traefik instances to serve this container.
traefik.yaml
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
constraints: "Label(`dev.gero.expose-externally`,`true`)"
Now i wanna use Sablier for some of my container (Scale to Zero).
Unfortunately to use Sablier, i have to switch to dynamic configuration files, for these container.
dynamic-config.yaml
http:
services:
whoami-sablier-service:
loadBalancer:
servers:
- url: "http://whoami:80" # http://xxx:yy xxx is the container name and yy port inside the container
#- port: 80
middlewares:
sablier-whoami:
plugin:
sablier:
sablierUrl: http://sablier:10000
sessionDuration: 15m
# names here will be reference to the docker container name
names: whoami
dynamic:
displayName: Whoami
refreshFrequency: 5s
showDetails: "true"
theme: shuffle
routers:
whoami-sablier-router:
rule: "Host(`whoami.mydomain.de`)"
service: whoami-sablier-service # reference to the services name that defined above
entryPoints:
- "websecure"
middlewares:
- sablier-whoami@file
tls:
certResolver: myresolver
dev:
gero:
expose-internally: "true"
wud:
watch: "true"
include: "v\d+\.\d+\.\d+$$"
I also use WUD (What’s up docker). The labels are
- wud.watch=true
- wud.tag.include=v\d+\.\d+\.\d+$$
Can you point me in the direction to migrate the labels to the dynamic configuration file?
Labels and dynamic configuration files at the same time are not possible right?