-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.test.yml
48 lines (44 loc) · 1.65 KB
/
docker-compose.test.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"
networks:
traefik-proxy:
volumes:
traefik-proxy:
services:
traefik-proxy:
image: traefik:v2.9
restart: unless-stopped
networks:
- traefik-proxy
security_opt:
- no-new-privileges:true
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-proxy"
- "--entrypoints.web.address=:80"
- "--entrypoints.traefik.address=:9000"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--experimental.localPlugins.jwt-validation-middleware.moduleName=github.com/legege/jwt-validation-middleware"
ports:
- "80:80"
- "127.0.0.1:9000:9000"
volumes:
- "traefik-proxy:/data"
- ".:/plugins-local/src/github.com/legege/jwt-validation-middleware/"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: traefik/whoami
networks:
- traefik-proxy
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`test.host.local`)"
- "traefik.http.routers.whoami.middlewares=test-jwt"
- "traefik.http.middlewares.test-jwt.plugin.jwt-validation-middleware.secret=ThisIsMyVerySecret"
- "traefik.http.middlewares.test-jwt.plugin.jwt-validation-middleware.optional=true"
- "traefik.http.middlewares.test-jwt.plugin.jwt-validation-middleware.payloadHeaders.x-custom-header1=sub"
- "traefik.http.middlewares.test-jwt.plugin.jwt-validation-middleware.payloadHeaders.x-custom-header2=name"
- "traefik.http.middlewares.test-jwt.plugin.jwt-validation-middleware.payloadHeaders.x-custom-header3=unknown"