Just dove back in after moving back to NGINX when the 1.x to 2.x shift happened. I am most of the way back to an entirely working setup, sans not being able to leverage custom TLS options or middleware files.
below is my docker-compose.yml
version: "3"
services:
traefik:
image: traefik
container_name: "traefik"
hostname: "traefik"
networks:
- default
ports:
- "80:80"
- "8999:8080"
- "443:443"
- "8443:8443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "$PWD/traefik.yml:/etc/traefik/traefik.yml:ro"
- "$PWD/conf/:/rules:ro"
- "$PWD/acme/acme.json:/letsencrypt/acme.json"
- "$PWD/log/traefik.log:/traefik.log"
environment:
- CF_API_EMAIL=jobbluth@gmail.com
- CF_API_KEY=aztectomb
labels:
# global redirect to https
- traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
- traefik.http.routers.http-catchall.entrypoints=web
- traefik.http.routers.http-catchall.middlewares=redirect-to-https
#Middleware redirect
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
# global wildcard certificates
- traefik.enable=true
- traefik.http.routers.traefik.tls.certresolver=lets-encr
- traefik.http.routers.traefik.tls.domains[0].main=bluthco.com
- traefik.http.routers.traefik.tls.domains[0].sans=*.bluthco.com
# dashboard
- traefik.http.routers.traefik.rule=Host(`traefik.bluthco.com`)
- traefik.http.routers.traefik.tls=true
- traefik.http.routers.traefik.entrypoints=websecure
- traefik.http.routers.traefik.service=api@internal
networks:
default:
external:
name: public
here is the traefik,yml
## STATIC CONFIGURATION
api:
insecure: true
dashboard: true
log:
level: DEBUG
filePath: "traefik.log"
format: json
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
websecure2:
address: ":8443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: "public"
file:
directory: "/rules"
watch: true
certificatesResolvers:
lets-encr:
acme:
email: buster.bluth@bluthco.com
storage: /letsencrypt/acme.json
#caServer: https://acme-staging-v02.api.letsencrypt.org/directory
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53"
delayBeforeCheck: 0
here is the tls file id like to leverage
tls:
options:
TLSv13:
minVersion: VersionTLS13
cipherSuites:
- TLS_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
sniStrict: true
TLSv12:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
sniStrict: true
I get the fun TLSv12 not found when applying the
- "traefik.http.routers.droppy.tls.options=TLSv12@file"
to any container with the above label applied, the labels below all redirect TLS with no issue
labels:
- "traefik.enable=true"
- "traefik.http.routers.droppy.rule=Host(`mywebsite.bluthco.com`)"
- "traefik.http.routers.droppy.entrypoints=websecure2"
- "traefik.http.routers.droppy.tls=true
I confirmed the files are redirecting by getting into the container, everything looks like it should
Here is the entry from the log file
"websecure2","level":"debug","middlewareName":"https-redirect@file","middlewareType":"undefined","msg":"Middleware name not found in config (ResponseModifier)
Any assistance is much appreciated.