generated from traefik/plugindemo
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconf-from-labels.yml
48 lines (46 loc) · 2.57 KB
/
conf-from-labels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3.3"
services:
traefik:
# build:
# context: .
image: traefik:v2.10.0
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
# Load ldapAuth from local private plugins format ===============================#
# https://github.com/traefik/traefik/pull/8224 #
# "A plugin must be declared in the static configuration" #
# https://doc.traefik.io/traefik-pilot/plugins/overview/#installing-plugins #
- "--experimental.localPlugins.ldapAuth.moduleName=github.com/wiltonsr/ldapAuth" #
# ===============================================================================#
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "../../ldapAuth:/plugins-local/src/github.com/wiltonsr/ldapAuth:ro"
whoami:
image: "traefik/whoami"
container_name: "whoami"
labels:
- traefik.http.routers.whoami.rule=Host(`whoami.localhost`)
- traefik.http.routers.whoami.entrypoints=web
# ldapAuth Register Middleware ====================================================================
- traefik.http.routers.whoami.middlewares=ldap_auth
# ldapAuth Options=================================================================================
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.logLevel=DEBUG
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.baseDN=dc=example,dc=com
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.attribute=uid
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[0].url=ldap://ldap.forumsys.com
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[0].port=389
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[0].weight=20
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[1].url=ldap://ldap2.forumsys.com
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[1].port=636
- traefik.http.middlewares.ldap_auth.plugin.ldapAuth.serverList[1].weight=10
# AllowedGroups and AllowedUsers are not supported with labels, because multiple value labels are separated with commas
# SearchFilter must not escape curly braces when using labels
# - traefik.http.middlewares.ldap_auth.plugin.ldapAuth.searchFilter=({{.Attribute}}={{.Username}})
# =================================================================================================