Hello community!
I checked lot of posts with dashboard access, but I cannot make it work even with example from docs.
Currently I use traefik 2.10.1. I want to make dashboard available on secure port(443) with authentication. Now I simplify it to get dashboard on http port.
If I enable insecure, then dashboard works.
Here is my config file:
providers:
docker:
# allowEmptyServices: true
exposedByDefault: false
api:
dashboard: true
log:
level: DEBUG
################################################################
# Entrypoint
################################################################
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
certificatesResolvers:
resolver:
acme:
email: support@my-domain.com
storage: /etc/traefik/acme/acme.json
httpChallenge:
entryPoint: web
letls:
acme:
email: support@my-domain.com
storage: /etc/traefik/acme/acme.json
tlsChallenge: {}
My docker-compose:
version: '3.5'
services:
traefik:
hostname: traefik
image: traefik:v2.10.1
container_name: traefik
restart: always
domainname: my-domain.com
ports:
- "80:80"
- "443:443"
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- /etc/localtime:/etc/localtime:ro
- ./letsencrypt-acme:/etc/traefik/acme:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
#Current config. Simplified
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`my-domain.com`)"
- "traefik.http.routers.dashboard.service=api@internal"
#Prev config found on Github that I should add port for LB
# - traefik.enable = true
# - traefik.http.routers.api.rule="Host(`my-domain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
# - traefik.http.routers.api.entrypoints=websecure
# - traefik.http.routers.api.service=api@internal
# - traefik.http.services.dummy.loadBalancer.server.port=65535
#Initial config with tls
# - traefik.http.routers.api.tls=true
# - traefik.http.routers.api.rule="Host(`my-domain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
# - traefik.http.routers.api.entrypoints=websecure
# - traefik.http.routers.api.tls.certresolver=resolver # Also I try to use letls
# - traefik.http.routers.api.service=api@internal
networks:
apps_net:
networks:
apps_net:
external: true
I checked container labels with docker inspect they are intact. Try to connect with curl -404, browser confirm this.
Please help me to fix this.