all
This commit is contained in:
23
Reseaux/Traefik/configs/dynamic/dashboard.yml
Normal file
23
Reseaux/Traefik/configs/dynamic/dashboard.yml
Normal file
@ -0,0 +1,23 @@
|
||||
http:
|
||||
routers:
|
||||
traefik:
|
||||
rule: Host(`dashboard.10.0.4.29.traefik.me`)
|
||||
entryPoints:
|
||||
- https
|
||||
service: api@internal
|
||||
middlewares:
|
||||
- dashboardauth
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
traefik-http-redirect:
|
||||
rule: Host(`dashboard.10.0.4.29.traefik.me`)
|
||||
entryPoints:
|
||||
- http
|
||||
service: api@internal
|
||||
middlewares:
|
||||
- "redirect-to-https"
|
||||
middlewares:
|
||||
dashboardauth:
|
||||
basicAuth:
|
||||
users:
|
||||
- "admin:$2y$10$GXOzS6L1s3gwQb8zO90LKOGuvZfurIXCBgJjZ5ib9/p5l3cy1sid6"
|
50
Reseaux/Traefik/configs/dynamic/global-middlewares.yml
Normal file
50
Reseaux/Traefik/configs/dynamic/global-middlewares.yml
Normal file
@ -0,0 +1,50 @@
|
||||
http:
|
||||
middlewares:
|
||||
redirect-to-https:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
hsts-minimal:
|
||||
headers:
|
||||
stsSeconds: 31536000
|
||||
stsIncludeSubdomains: false
|
||||
stsPreload: false
|
||||
forceSTSHeader: true
|
||||
hsts-standard:
|
||||
headers:
|
||||
stsSeconds: 31536000
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: false
|
||||
forceSTSHeader: true
|
||||
hsts-full:
|
||||
headers:
|
||||
stsSeconds: 31536000
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
forceSTSHeader: true
|
||||
|
||||
# Redirect non-www URLs to their www equivalent
|
||||
# Use with traefik.http.routers.myRouter.middlewares: "redirect-non-www-to-www@file"
|
||||
# Source: https://www.benjaminrancourt.ca/how-to-redirect-from-non-www-to-www-with-traefik/
|
||||
redirect-non-www-to-www:
|
||||
# Redirect a request from an url to another with regex matching and replacement
|
||||
redirectregex:
|
||||
# Apply a permanent redirection (HTTP 301)
|
||||
permanent: true
|
||||
# The regular expression to match and capture elements from the request URL
|
||||
regex: "^https?://(?:www\\.)?(.+)"
|
||||
# How to modify the URL to have the new target URL
|
||||
replacement: "https://www.${1}"
|
||||
|
||||
# Redirect www URLs to their non-www equivalent
|
||||
# Use with traefik.http.routers.myRouter.middlewares: "redirect-www-to-non-www@file"
|
||||
# Source: https://www.benjaminrancourt.ca/how-to-redirect-from-non-www-to-www-with-traefik/
|
||||
redirect-www-to-non-www:
|
||||
# Redirect a request from an url to another with regex matching and replacement
|
||||
redirectregex:
|
||||
# Apply a permanent redirection (HTTP 301)
|
||||
permanent: true
|
||||
# The regular expression to match and capture elements from the request URL
|
||||
regex: "^https?://www\\.(.+)"
|
||||
# How to modify the URL to have the new target URL
|
||||
replacement: "https://${1}"
|
14
Reseaux/Traefik/configs/dynamic/tls.yml
Normal file
14
Reseaux/Traefik/configs/dynamic/tls.yml
Normal file
@ -0,0 +1,14 @@
|
||||
tls:
|
||||
stores:
|
||||
default:
|
||||
defaultCertificate:
|
||||
certFile: /etc/traefik/ssl/cert.pem
|
||||
keyFile: /etc/traefik/ssl/privkey.pem
|
||||
certificates:
|
||||
- certFile: /etc/traefik/ssl/cert.pem
|
||||
keyFile: /etc/traefik/ssl/privkey.pem
|
||||
options:
|
||||
default:
|
||||
minVersion: VersionTLS12
|
||||
mintls13:
|
||||
minVersion: VersionTLS1
|
85
Reseaux/Traefik/configs/traefik.yml
Normal file
85
Reseaux/Traefik/configs/traefik.yml
Normal file
@ -0,0 +1,85 @@
|
||||
## static configuration
|
||||
|
||||
global:
|
||||
# Send anonymous usage data
|
||||
sendAnonymousUsage: false
|
||||
checkNewVersion: true
|
||||
|
||||
entryPoints:
|
||||
http:
|
||||
address: ":80"
|
||||
# forwardedHeaders:
|
||||
# insecure: true
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: https
|
||||
scheme: https
|
||||
https:
|
||||
address: ":443"
|
||||
# forwardedHeaders:
|
||||
# insecure: true
|
||||
# http:
|
||||
# middlewares:
|
||||
# - secureHeaders@file
|
||||
# tls:
|
||||
# certResolver: letsencrypt
|
||||
metrics:
|
||||
address: ":8181"
|
||||
|
||||
providers:
|
||||
docker:
|
||||
endpoint: "unix:///var/run/docker.sock"
|
||||
exposedByDefault: false
|
||||
watch: true
|
||||
file:
|
||||
directory: /etc/traefik/dynamic
|
||||
watch: true
|
||||
providersThrottleDuration: 10
|
||||
|
||||
certificatesResolvers:
|
||||
cloudflare:
|
||||
acme:
|
||||
email: admin@tips-of-mine.fr
|
||||
storage: acme.json
|
||||
dnsChallenge:
|
||||
provider: cloudflare
|
||||
resolvers:
|
||||
- "1.1.1.1:53"
|
||||
- "1.0.0.1:53"
|
||||
tlschallenge: true
|
||||
httpchallenge:
|
||||
entrypoint: http
|
||||
|
||||
api:
|
||||
# insecure: true
|
||||
dashboard: true
|
||||
|
||||
log:
|
||||
level: DEBUG
|
||||
filepath: "/var/log/traefik.log"
|
||||
format: json
|
||||
# default: "common"
|
||||
|
||||
accesslog:
|
||||
filepath: "/var/log/access.log"
|
||||
format: json
|
||||
bufferingSize: 100
|
||||
# format: common
|
||||
|
||||
# Ajout de la partie métrique qui concerne Prometheus
|
||||
metrics:
|
||||
prometheus:
|
||||
# Nom du point d'entrée défini au dessus
|
||||
entryPoint: metrics
|
||||
# On configure la latence des métriques
|
||||
buckets:
|
||||
- 0.1
|
||||
- 0.3
|
||||
- 1.2
|
||||
- 5.0
|
||||
# Ajout des métriques sur les points d'entrée
|
||||
addEntryPointsLabels: true
|
||||
# Ajout des services
|
||||
addServicesLabels: true
|
||||
addRoutersLabels: true
|
Reference in New Issue
Block a user