traefik config

This commit is contained in:
2026-01-14 00:38:17 +00:00
parent f18cfb01e8
commit 0b92926a41
2 changed files with 19 additions and 15 deletions

View File

@@ -4,7 +4,7 @@ http:
# Crowdsec # Crowdsec
crowdsec-bouncer: crowdsec-bouncer:
plugin: plugin:
crowdsec-bouncer-plugin: crowdsec-bouncer-traefik-plugin:
enabled: true enabled: true
logLevel: INFO logLevel: INFO
updateIntervalSeconds: 60 updateIntervalSeconds: 60
@@ -16,12 +16,12 @@ http:
# generated using "docker exec crowdsec cscli bouncers add crowdsecBouncer" # generated using "docker exec crowdsec cscli bouncers add crowdsecBouncer"
crowdseclapikey: {{ env "TRAEFIK_CROWDSEC_API_KEY" }} crowdseclapikey: {{ env "TRAEFIK_CROWDSEC_API_KEY" }}
forwardedHeadersTrustedIPs: forwardedHeadersTrustedIPs:
- 10.0.6.0/24 - 10.0.0.0/8
clientTrustedIPs: clientTrustedIPs:
- 192.168.178.0/24 - 192.168.178.0/24
captchaProvider: hcaptcha captchaProvider: hcaptcha
captchaSiteKey: b2d20610-8dda-4f40-8688-7ca8e1e628f8 # found in hcaptcha account captchaSiteKey: b2d20610-8dda-4f40-8688-7ca8e1e628f8 # found in hcaptcha account
captchaSecretKey: ES_9511d34bbec34dada169afad0a36991a captchaSecretKey: {{ env "TRAEFIK_CAPTCHA_KEY" }}
captchaGracePeriodSeconds: 1800 captchaGracePeriodSeconds: 1800
captchaHTMLFilePath: /captcha.html captchaHTMLFilePath: /captcha.html
banHTMLFilePath: /ban.html banHTMLFilePath: /ban.html
@@ -150,15 +150,4 @@ http:
node: node:
loadBalancer: loadBalancer:
servers: servers:
- url: {{ env TRAEFIK_MAIN_SERVER_NODE_IP }} - url: http://{{ env "TRAEFIK_MAIN_SERVER_NODE_IP" }}
tls:
stores:
default:
defaultCertificate:
certFile: /etc/certs/server.crt
keyFile: /etc/certs/server.key
certificates:
- certFile: /etc/certs/server.crt
keyFile: /etc/certs/server.key

View File

@@ -54,6 +54,15 @@ entryPoints:
- "192.168.178.0/16" - "192.168.178.0/16"
- "2a07:600:200:1::/64" - "2a07:600:200:1::/64"
certificatesResolvers:
myresolver:
acme:
email: chris.windler@crescentec.ch
storage: acme.json
httpChallenge:
# used during the challenge
entryPoint: http
providers: providers:
docker: docker:
endpoint: "unix:///var/run/docker.sock" # Listen to the UNIX Docker socket endpoint: "unix:///var/run/docker.sock" # Listen to the UNIX Docker socket
@@ -65,3 +74,9 @@ providers:
metrics: metrics:
prometheus: {} prometheus: {}
experimental:
plugins:
crowdsec-bouncer-traefik-plugin:
moduleName: "github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
version: "v1.5.0-beta1"