I'm Stucked with an error

Hi, everyone I'm a newbie with traefik. But it seems very efficent to manage https and letsencrypt.
I tried to install traefik with portainer and amink to a NAS.
I 've this error message :"" level=error msg="Router defined multiple times with different configurations in [portainer-main-59....traefik-main-94..]" providerName=docker routerName=traefik-secure
" level=error msg="the service "nas@file" does not exist" routerName=nas@docker entryPointName=websecure.

This is my docker-compose file :

version: "3"

services:
traefik:
restart: unless-stopped
image: traefik:latest
container_name: traefik
security_opt:
- no-new-privileges:true
networks:
- dockernet
ports:
- 80:80
- 443:443
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /share/DockerVolumes/traefik/traefik.yml:/traefik.yml:ro
- /share/DockerVolumes/traefik/conf/dynamic.yml:/conf/dynamic.yml
- /share/DockerVolumes/traefik/cert/acme.json:/acme.json
- /share/DockerVolumes/traefik/log:/log
labels:
- "traefik.enable=true"
- "traefik.docker.network=dockernet"
- "traefik.http.routers.traefik-secure.entrypoints=websecure"
- "traefik.http.routers.traefik-secure.rule=Host(traefikmydomain)"
- "traefik.http.routers.traefik-secure.service=api@internal"
- "traefik.http.routers.traefik-secure.middlewares=user-auth@file"

  - "traefik.http.routers.nas.entrypoints=websecure"
  - "traefik.http.routers.nas.rule=Host(`admin.mydomain`)"
  - "traefik.http.routers.nas.service=nas@file"
  - "traefik.http.services.nas.loadbalancer.server.port=1234"   

portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- dockernet
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /share/DockerVolumes/portainer/data:/data
labels:
- "traefik.enable=true"
- "traefik.docker.network=dockernet"
- "traefik.http.routers.portainer-secure.entrypoints=websecure"
- "traefik.http.routers.portainer-secure.rule=Host(portainer.mydomain)"
- "traefik.http.routers.portainer-secure.service=portainer"
- "traefik.http.routers.portainer-secure.middlewares=user-auth@file"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"

networks:
dockernet:
external: true

This is my dynamic file for traefik :

http:
middlewares:
secureHeaders:
headers:
sslRedirect: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 31536000

user-auth:
  basicAuth:
    users:
      - "59Hubby176:jhgfgyygyguygugkyfuyfdcgvtfxgn$^!" 

services:
nas:
loadbalancer:
servers:
- url: "http://192.168.147.200:1234/"

tls:
options:
default:
cipherSuites:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
minVersion: VersionTLS12

And at last my static file for traefik :

#traefik.yaml
api:
dashboard: true

entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure

websecure:
address: :443
http:
middlewares:
- secureHeaders@file
tls:
certResolver: lets-encrypt

providers:
docker:
endpoint: "unix:///var/run/docker.sock"
network: dockernet
exposedByDefault: false
watch: true

file:
filename: "conf/dynamic.yml"

certificatesResolvers:
lets-encrypt:
acme:
email:admin@mydomain
storage: acme.json
keyType: EC384
httpChallenge:
entryPoint: web

Do you have any clue to help me please ?
Thanksfor your help

I just saw that i made a mistake in my topic : in the docker compose file, in place of - "traefik.http.routers.traefik-secure.rule=Host( traefikmydomain )" read Host( traefik.mydomain )"
I've forgot the dot.
Nevertheless
With this files I've install a bitwarden server too, not in the same stack but with a traefik configuration...and it works very well with https !! how can this be possible, because the traefik dashbord doesn't work, only the portainer with https...any clue?