Hi guys,
i have in my local Docker an Traefik installation with the following configuration:
docker-compose.yml
version: '3.7'
services:
traefik:
container_name: traefik
environment:
- DO_AUTH_TOKEN=84ddff236a4277aa20368e6a5005dd012725bc5c4881afc17151e1ef83081b43
image: traefik:latest
labels:
- traefik.enable=true
- traefik.http.routers.traefik.rule=Host(`traefik.local.unitfactory.services`)
- traefik.http.routers.traefik.entrypoints=websecure
- traefik.http.routers.traefik.tls.certresolver=digitalocean
- traefik.http.routers.traefik.service=api@internal
- traefik.http.routers.traefik.middlewares=auth@docker
- traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$10$$/YnKe2oKSo9dc.oHiqM22eJrLfhKcvikK0W68Iv705ZYvw03niZ.G
networks:
- traefik_network
ports:
- 80:80
- 8080:8080
- 443:443
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/:/etc/traefik/:rw
networks:
traefik_network:
name: traefik_network
driver: bridge
traefik.toml
[log]
level = "ERROR"
[providers]
[providers.docker]
exposedByDefault = false
endpoint = "unix:///var/run/docker.sock"
network = "traefik_network"
[providers.file]
filename = "/etc/traefik/dynamic.yml"
[api]
dashboard = true
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.websecure]
address = ":443"
[certificatesResolvers.digitalocean.acme]
email = "mymail"
storage = "/etc/traefik/acme.json"
[certificatesResolvers.digitalocean.acme.dnsChallenge]
provider="digitalocean"
delayBeforeCheck = 0
[[acme.domains]]
main = "*.unitfactory.services"
dynamic.yml
tls:
options:
default:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
- TLS_AES_128_GCM_SHA256
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
curvePreferences:
- CurveP521
- CurveP384
sniStrict: true
http:
middlewares:
secHeaders:
headers:
browserXssFilter: true
contentTypeNosniff: true
frameDeny: true
sslRedirect: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 31536000
customRequestHeaders:
X-Frame-Options: "SAMEORIGIN"
customFrameOptionsValue: "SAMEORIGIN"
```
In my local hosts file i make the entry:
127.0.0.1 traefik.local.unitfactory.services
When i put the URL traefik.local.unitfactory.services or traefik.local.unitfactory.services:8080 in my Browser, i got the error in chrome ERR_CONNECTION_CLOSED
Someone has an idea what is wrong in this configuration?
Cheers
Ralf