generated from traefik/plugindemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
32 lines (30 loc) · 1.25 KB
/
docker-compose.local.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
version: "3.3"
services:
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--experimental.localPlugins.session-max-age.moduleName=github.com/longbridgeapp/traefik-session-max-age"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- '.:/plugins-local/src/github.com/longbridgeapp/traefik-session-max-age'
whoami:
image: "traefik/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
- "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.routers.whoami.middlewares=session-max-age@docker"
- "traefik.http.middlewares.session-max-age.plugin.session-max-age.CookieName=_traefik_session"
- "traefik.http.middlewares.session-max-age.plugin.session-max-age.MaxAge=10000"
- "traefik.http.services.whoami.loadBalancer.sticky.cookie=true"
- "traefik.http.services.whoami.loadBalancer.sticky.cookie.name=_traefik_session"
- "traefik.http.services.whoami.loadbalancer.server.port=80"