-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-whoami.yaml
38 lines (29 loc) · 1.21 KB
/
docker-compose-whoami.yaml
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
version: "3.3"
name: example
services:
whoami:
image: "containous/whoami"
labels:
- "traefik.enable=true"
# Attach to traefik's backend network.
- "traefik.docker.network=traefik_net"
# Traefik Host rule, used for routing, and also TLS certificate generation.
- "traefik.http.routers.whoami.rule=Host(`whoami.example.com`)"
- "traefik.http.routers.whoami.service=whoami"
# Attach to TLS-enabled entrypoint, telling traefik to get a certificate
# from the Step CA certificate resolver
- "traefik.http.routers.whoami.entryPoints=websecure"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=step-ca-resolver"
- "traefik.http.routers.whoami.tls.domains[0].main=whoami.example.com"
# The port the service is listening to
- "traefik.http.services.whoami.loadbalancer.server.port=80"
# Checks traffic against the OWASP ModSecurity Core Rule Set.
- "traefik.http.routers.whoami.middlewares=waf"
# Make sure clients are authenticated
- "traefik.http.routers.whoami.middlewares=traefik-forward-auth"
networks:
- traefik_net
networks:
traefik_net:
external: true