feat: add traefik

This commit is contained in:
lab
2021-09-19 13:56:24 +08:00
parent 53d14cb434
commit 1d2d569b6d
6 changed files with 177 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
http:
middlewares:
dashboard-basicauth:
basicauth:
users:
- "traefik:$apr1$XDijc7ic$RofeDix3G.lYtoomdQ6TD."
dashboard-mw-chain:
chain:
middlewares:
- "gzip-compress"
- "dashboard-basicauth"
routers:
dashboard-web:
entrypoints: web
rule: "Host(`localhost`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
service: "api@internal"
middlewares:
- "dashboard-mw-chain"

9
traefik/conf/global.yml Normal file
View File

@@ -0,0 +1,9 @@
http:
middlewares:
websecure-redirectscheme:
redirectScheme:
scheme: "https"
permanent: true
gzip-compress:
compress:
excludedcontenttypes: "text/event-stream"