Traefik Labels
If you plan on using Traefik, you need these labels in your Traefik Docker compose file:
labels:
traefik.enable: true
traefik.http.routers.api.rule: Host(`traefik.domain.com`)
traefik.http.routers.api.entryPoints: https
traefik.http.routers.api.service: api@internal
traefik.http.routers.api.middlewares: auth@file
Adding Authentication to Containers
If using Traefik and Authentik, you need to tell each container to route via authentik.
Replace <appname> with the name of the app you are applying the label to.
Replace the 'auth' in auth@file with the name of the middleware you gave to Authentik in Traefik config files.
traefik.http.routers.<appname>.middlewares: auth@file
Last updated
Was this helpful?