-
Notifications
You must be signed in to change notification settings - Fork 0
/
whoami.yml
58 lines (55 loc) · 3.12 KB
/
whoami.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
49
50
51
52
53
54
55
56
57
58
version: '3.3'
services:
traefik:
# Use the latest v2.2.x Traefik image available
image: containous/whoami
deploy:
mode: replicated
replicas: 3
placement:
constraints:
# Make the traefik service run only on the node with this label
# as the node with it has the volume for the certificates
#- node.labels.traefik-public.traefik-public-certificates == true
# Make traefik service run only on workder nodes
- node.role == worker
labels:
# Enable Traefik for this service, to make it available in the public network
- traefik.enable=true
# Use the traefik-public network (declared below)
- traefik.docker.network=traefik-public
# Use the custom label "traefik.constraint-label=traefik-public"
# This public Traefik will only use services with this label
# That way you can add other internal Traefik instances per stack if needed
- traefik.constraint-label=traefik-public
# admin-auth middleware with HTTP Basic auth
# Using the environment variables USERNAME and HASHED_PASSWORD
# #- traefik.http.middlewares.admin-auth.basicauth.users=${USERNAME?Username variable not set}:$${HASHED_PASSWORD?Password variable not set}
# https-redirect middleware to redirect HTTP to HTTPS
# It can be re-used by other stacks in other Docker Compose files
# - traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
# - traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
# traefik-http set up only to use the middleware to redirect to https
# Uses the environment variable DOMAIN
# #- traefik.http.routers.traefik-public-http.rule=Host(`${DOMAIN?Domain variable not set}`)
# - traefik.http.routers.traefik-public-http.rule=Host(`traefik.lan`) || Host(`traefik.local`) || Host(`traefik.lan2`) || Host(`traefik.lan3`)
# - traefik.http.routers.traefik-public-http.middlewares=https-redirect
# traefik-https the actual router using HTTPS
# Uses the environment variable DOMAIN
# #- traefik.http.routers.traefik-public-https.rule=Host(`${DOMAIN?Domain variable not set}`)
# - traefik.http.routers.traefik-public-https.rule=Host(`traefik.lan`) || Host(`traefik.local`) || Host(`traefik.lan2`) || Host(`traefik.lan3`)
# - traefik.http.routers.traefik-public-https.entrypoints=https
# - traefik.http.routers.traefik-public-https.tls=true
# Use the special Traefik service api@internal with the web UI/Dashboard
# - traefik.http.routers.traefik-public-https.service=api@internal
# Use the "le" (Let's Encrypt) resolver created below
# #- traefik.http.routers.traefik-public-https.tls.certresolver=le
# Enable HTTP Basic auth, using the middleware created above
# #- traefik.http.routers.traefik-public-https.middlewares=admin-auth
# Define the port inside of the Docker service to use
- traefik.http.services.traefik-public.loadbalancer.server.port=80
networks:
- traefik-public
networks:
traefik-public:
external: true