Hi!
I have some problem with running traefik in my docker. Now i receive "close tcp [::]:80: use of closed network connection".
my docker-compose.yml
---
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
proxy:
ports:
- 80:80
- 443:443
environment:
- CF_API_EMAIL=${CF_EMAIL}
- CF_DNS_API_TOKEN=${CF_DNS_TOKEN}
- CF_API_KEY=${CF_API_KEY}
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/user/docker/traefik/traefik.yml:/root/docker/traefik/traefik.yml:ro
- /home/user/docker/traefik/acme.json:/root/docker/traefik/acme.json
- /home/user/docker/traefik/config.yml:/root/docker/traefik/config.yml:ro
- /home/user/docker/traefik/logs:/root/docker/traefik/logs
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`traefik.dom.com`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_API_BASIC_AUTH_USERS}"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`ttraefik.dom.com`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=cloudflare"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=dom.com"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.dom.com"
- "traefik.http.routers.traefik-secure.service=api@internal"
networks:
proxy:
name: proxy
external: true
traefik.yml:
api:
dashboard: true
debug: true
insecure: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
traefik:
address: ":8080"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /config.yml
certificatesResolvers:
cloudflare:
acme:
email: ${CF_EMAIL}
storage: acme.json
dnsChallenge:
provider: cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
log:
level: "DEBUG"
filePath: "/var/log/traefik/traefik.log"
accessLog:
filePath: "/var/log/traefik/access.log"
And for now i have empty dynamic config file
How can i fix this error?
Thanks in advance!