This commit is contained in:
23
configs/dynamic/dashboard.yml
Normal file
23
configs/dynamic/dashboard.yml
Normal file
@ -0,0 +1,23 @@
|
||||
http:
|
||||
routers:
|
||||
traefik:
|
||||
rule: Host(`dashboard.tips-of-mine.com`)
|
||||
entryPoints:
|
||||
- https
|
||||
service: api@internal
|
||||
middlewares:
|
||||
- dashboardauth
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
traefik-http-redirect:
|
||||
rule: Host(`dashboard.tips-of-mine.com`)
|
||||
entryPoints:
|
||||
- http
|
||||
service: api@internal
|
||||
middlewares:
|
||||
- "redirect-to-https"
|
||||
middlewares:
|
||||
dashboardauth:
|
||||
basicAuth:
|
||||
users:
|
||||
- "admin:$2y$10$GXOzS6L1s3gwQb8zO90LKOGuvZfurIXCBgJjZ5ib9/p5l3cy1sid6"
|
105
configs/dynamic/global-middlewares.yml
Normal file
105
configs/dynamic/global-middlewares.yml
Normal file
@ -0,0 +1,105 @@
|
||||
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}"
|
||||
|
||||
# default-headers:
|
||||
# headers:
|
||||
# frameDeny: true
|
||||
# browserXssFilter: true
|
||||
# contentTypeNosniff: true
|
||||
# forceSTSHeader: true
|
||||
# stsIncludeSubdomains: true
|
||||
# stsPreload: true
|
||||
# stsSeconds: 15552000
|
||||
# customFrameOptionsValue: SAMEORIGIN
|
||||
# customRequestHeaders:
|
||||
# X-Forwarded-Proto: https
|
||||
|
||||
# crowdsec:
|
||||
# plugin:
|
||||
# bouncer:
|
||||
# enabled: true
|
||||
# logLevel: INFO
|
||||
# updateIntervalSeconds: 15
|
||||
# updateMaxFailure: 0
|
||||
# defaultDecisionSeconds: 15
|
||||
# httpTimeoutSeconds: 10
|
||||
# crowdsecMode: stream
|
||||
# crowdsecAppsecEnabled: true
|
||||
# crowdsecAppsecHost: crowdsec:7422
|
||||
# crowdsecAppsecFailureBlock: true
|
||||
# crowdsecAppsecUnreachableBlock: true
|
||||
# crowdsecLapiKey: #####REPLACE_API_KEY##### # Replace CrowdSec API key (docker exec crowdsec cscli bouncers add crowdsecBouncer)
|
||||
# crowdsecLapiKeyFile: /etc/traefik/cs-privateKey-foo
|
||||
# crowdsecLapiHost: crowdsec:8080
|
||||
# crowdsecLapiScheme: http
|
||||
# forwardedHeadersTrustedIPs:
|
||||
# - 10.0.35.4/32 # Cloudflare tunnel IP address
|
||||
# - 172.30.0.0/24 # Reverse Proxy IP address
|
||||
# clientTrustedIPs:
|
||||
# - 10.0.1.0/24 # Internal LAN IP addresses
|
||||
# - 10.0.2.0/24 # Internal LAN IP addresses
|
||||
# - 10.0.3.0/24 # Internal LAN IP addresses
|
||||
# - 10.0.4.0/24 # Internal LAN IP addresses
|
||||
# - 10.0.5.0/24 # Internal LAN IP addresses
|
||||
# forwardedHeadersCustomName: CF-Connecting-IP # Cloudflare IP address header
|
||||
|
||||
# default-whitelist:
|
||||
# ipWhiteList:
|
||||
# sourceRange:
|
||||
# - "10.0.4.0/24"
|
||||
# - "192.168.0.0/16"
|
||||
# - "172.16.0.0/12"
|
||||
|
||||
# secured:
|
||||
# chain:
|
||||
# middlewares:
|
||||
# - default-whitelist
|
||||
# - default-headers
|
13
configs/dynamic/harbor.yml.old
Normal file
13
configs/dynamic/harbor.yml.old
Normal file
@ -0,0 +1,13 @@
|
||||
http:
|
||||
routers:
|
||||
harbor:
|
||||
service: harbor
|
||||
rule: "Host(`registry.tips-of-mine.com`)"
|
||||
tls:
|
||||
certResolver: production
|
||||
|
||||
services:
|
||||
harbor:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://172.27.0.1:8880"
|
13
configs/dynamic/registry.yml
Normal file
13
configs/dynamic/registry.yml
Normal file
@ -0,0 +1,13 @@
|
||||
http:
|
||||
routers:
|
||||
harbor:
|
||||
service: harbor
|
||||
rule: "Host(`registry.tips-of-mine.com`)"
|
||||
tls:
|
||||
certResolver: production
|
||||
|
||||
services:
|
||||
harbor:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://10.0.4.133:8083"
|
14
configs/dynamic/tls.yml
Normal file
14
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
|
158
configs/traefik.yml
Normal file
158
configs/traefik.yml
Normal file
@ -0,0 +1,158 @@
|
||||
## static configuration
|
||||
|
||||
global:
|
||||
# Send anonymous usage data
|
||||
sendAnonymousUsage: false
|
||||
checkNewVersion: true
|
||||
|
||||
entryPoints:
|
||||
# ftp:
|
||||
# address: ":21"
|
||||
ssh:
|
||||
address: ":22"
|
||||
# smtp:
|
||||
# address: ":25"
|
||||
# dns:
|
||||
# address: ":53"
|
||||
http:
|
||||
address: ":80"
|
||||
forwardedHeaders:
|
||||
insecure: true
|
||||
trustedIPs: &trustedIps
|
||||
- 10.0.4.0/24
|
||||
http:
|
||||
# middlewares: # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - "crowdsec@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - "cloudflarewarp@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: https
|
||||
scheme: https
|
||||
# ssh:
|
||||
# address: ":22"
|
||||
# pop3:
|
||||
# address: ":110"
|
||||
# imap:
|
||||
# address: ":143"
|
||||
https:
|
||||
address: ":443"
|
||||
forwardedHeaders:
|
||||
insecure: true
|
||||
trustedIPs: &trustedIps
|
||||
# http:
|
||||
# middlewares:
|
||||
# - crowdsec-bouncer@file
|
||||
# - cloudflarewarp@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - secureHeaders@file
|
||||
# tls:
|
||||
# certResolver: letsencrypt
|
||||
# smtp-ssl:
|
||||
# address: ":465"
|
||||
# starttls:
|
||||
# address: ":587"
|
||||
# imap-ssl:
|
||||
# address: ":993"
|
||||
# pop3-ssl:
|
||||
# address: ":995"
|
||||
# openvpn:
|
||||
# address: ":1194/udp"
|
||||
# mysql:
|
||||
# address: ":3306"
|
||||
# elasticsearch:
|
||||
# address: ":9200"
|
||||
metrics:
|
||||
address: ":8181"
|
||||
|
||||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
|
||||
providers:
|
||||
docker:
|
||||
endpoint: "unix:///var/run/docker.sock"
|
||||
exposedByDefault: false
|
||||
watch: true
|
||||
file:
|
||||
directory: /etc/traefik/dynamic
|
||||
watch: true
|
||||
providersThrottleDuration: 10
|
||||
|
||||
certificatesResolvers:
|
||||
staging:
|
||||
acme:
|
||||
email: admin@tips-of-mine.com
|
||||
storage: /var/traefik/certs/acme.json
|
||||
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
keyType: EC256
|
||||
dnsChallenge:
|
||||
provider: staging
|
||||
resolvers:
|
||||
- "1.1.1.1:53"
|
||||
- "1.0.0.1:53"
|
||||
tlschallenge: true
|
||||
# httpChallenge:
|
||||
# entryPoint: http
|
||||
production:
|
||||
acme:
|
||||
email: admin@tips-of-mine.com
|
||||
storage: /var/traefik/certs/acme.json
|
||||
caServer: "https://acme-v02.api.letsencrypt.org/directory"
|
||||
keyType: EC256
|
||||
dnsChallenge:
|
||||
provider: production
|
||||
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/traefik.log"
|
||||
format: json
|
||||
# default: "common"
|
||||
|
||||
accesslog:
|
||||
filepath: "/var/log/traefik/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
|
||||
|
||||
experimental:
|
||||
plugins:
|
||||
crowdsec-bouncer-traefik-plugin:
|
||||
moduleName: "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||
version: "v1.3.3"
|
||||
|
||||
traefik-maintenance:
|
||||
moduleName: "github.com/TRIMM/traefik-maintenance"
|
||||
version: "v1.0.1"
|
||||
|
||||
fail2ban:
|
||||
moduleName: "github.com/tomMoulard/fail2ban"
|
||||
version: "v0.8.3"
|
||||
|
||||
sablier:
|
||||
moduleName: "github.com/acouvreur/sablier"
|
||||
version: "v1.8.0-beta.22"
|
158
configs/traefik.ymlo
Normal file
158
configs/traefik.ymlo
Normal file
@ -0,0 +1,158 @@
|
||||
## static configuration
|
||||
|
||||
global:
|
||||
# Send anonymous usage data
|
||||
sendAnonymousUsage: false
|
||||
checkNewVersion: true
|
||||
|
||||
entryPoints:
|
||||
# ftp:
|
||||
# address: ":21"
|
||||
ssh:
|
||||
address: ":22"
|
||||
# smtp:
|
||||
# address: ":25"
|
||||
# dns:
|
||||
# address: ":53"
|
||||
http:
|
||||
address: ":80"
|
||||
forwardedHeaders:
|
||||
insecure: true
|
||||
trustedIPs: &trustedIps
|
||||
- 10.0.4.0/24
|
||||
http:
|
||||
# middlewares: # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - "crowdsec@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - "cloudflarewarp@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: https
|
||||
scheme: https
|
||||
# gitea-ssh:
|
||||
# address: ":2222"
|
||||
# pop3:
|
||||
# address: ":110"
|
||||
# imap:
|
||||
# address: ":143"
|
||||
https:
|
||||
address: ":443"
|
||||
forwardedHeaders:
|
||||
insecure: true
|
||||
trustedIPs: &trustedIps
|
||||
# http:
|
||||
# middlewares:
|
||||
# - crowdsec-bouncer@file
|
||||
# - cloudflarewarp@file" # CHANGE MADE HERE (BOUNCER ENABLED) !!!
|
||||
# - secureHeaders@file
|
||||
# tls:
|
||||
# certResolver: letsencrypt
|
||||
# smtp-ssl:
|
||||
# address: ":465"
|
||||
# starttls:
|
||||
# address: ":587"
|
||||
# imap-ssl:
|
||||
# address: ":993"
|
||||
# pop3-ssl:
|
||||
# address: ":995"
|
||||
# openvpn:
|
||||
# address: ":1194/udp"
|
||||
# mysql:
|
||||
# address: ":3306"
|
||||
# elasticsearch:
|
||||
# address: ":9200"
|
||||
metrics:
|
||||
address: ":8181"
|
||||
|
||||
serversTransport:
|
||||
insecureSkipVerify: true
|
||||
|
||||
providers:
|
||||
docker:
|
||||
endpoint: "unix:///var/run/docker.sock"
|
||||
exposedByDefault: false
|
||||
watch: true
|
||||
file:
|
||||
directory: /etc/traefik/dynamic
|
||||
watch: true
|
||||
providersThrottleDuration: 10
|
||||
|
||||
certificatesResolvers:
|
||||
staging:
|
||||
acme:
|
||||
email: admin@tips-of-mine.fr
|
||||
storage: acme.json
|
||||
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||
keyType: EC256
|
||||
dnsChallenge:
|
||||
provider: staging
|
||||
resolvers:
|
||||
- "1.1.1.1:53"
|
||||
- "1.0.0.1:53"
|
||||
tlschallenge: true
|
||||
# httpChallenge:
|
||||
# entryPoint: http
|
||||
production:
|
||||
acme:
|
||||
email: admin@tips-of-mine.fr
|
||||
storage: acme.json
|
||||
caServer: "https://acme-v02.api.letsencrypt.org/directory"
|
||||
keyType: EC256
|
||||
dnsChallenge:
|
||||
provider: production
|
||||
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/traefik.log"
|
||||
format: json
|
||||
# default: "common"
|
||||
|
||||
accesslog:
|
||||
filepath: "/var/log/traefik/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
|
||||
|
||||
experimental:
|
||||
plugins:
|
||||
crowdsec-bouncer-traefik-plugin:
|
||||
moduleName: "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||
version: "v1.3.3"
|
||||
|
||||
traefik-maintenance:
|
||||
moduleName: "github.com/TRIMM/traefik-maintenance"
|
||||
version: "v1.0.1"
|
||||
|
||||
fail2ban:
|
||||
moduleName: "github.com/tomMoulard/fail2ban"
|
||||
version: "v0.8.3"
|
||||
|
||||
sablier:
|
||||
moduleName: "github.com/acouvreur/sablier"
|
||||
version: "v1.8.0-beta.22"
|
Reference in New Issue
Block a user