A second domain - traefik v2 - docker swarm

Hi,

Iam using traefik for a time now (in docker swarm) and its running great for 1 domain (Heimdall), but now Iam trying to add another one (for Filebrowser). Can someone please tell me how to do this in the yaml files? so that Traefik can pull a lets encrypt certificate for it and I can use it for Heimdall (for instance)?
Yes: a subdomain works fine for Filebrowser, but I want to use my myseconddomain.com

my traefik static file looks like (which is working):

global:
  checkNewVersion: true

entryPoints:

  http:
    address: ":80"
    # Trust IPv4 Private Address Space
    forwardedHeaders:
      trustedIPs:
      # Local Network IP ranges
      - "192.168.0.0/16"
      - "192.168.2.0/16"      
      - "172.16.0.0/12"
      - "10.0.0.0/8"
    http:
      redirections:
        entryPoint:
          to: https
          scheme: https
          permanent: true
          priority: 300

  https:
    address: ":443"
    # Trust IPv4 Private Address Space
    forwardedHeaders:
      trustedIPs:
      # Local Network IP ranges
      - "192.168.0.0/16"
      - "192.168.2.0/16"
      - "172.16.0.0/12"
      - "10.0.0.0/8"
    http:
      tls:
        options: default
        certResolver: cloudflare
        domains:
          - main: mydomain.com
            sans:
            - "*.mydomain.com"

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock" 
    watch: true
    swarmMode: true
    network: traefik_public
    useBindPortIP: false
    exposedByDefault: false
  file:
    filename: /etc/traefik/traefik-dynamic.yaml
    watch: true
    debugLogGeneratedTemplate: false

  rest:
    insecure: true

api:
  dashboard: true
  insecure: true #op fase gezet #nu weer true 18nov
  debug: false #was eerst true

log:
  level: WARN
  filePath: "/etc/traefik/logs/traefik.log"

accessLog:
  filePath: "/etc/traefik/logs/access.log"

certificatesResolvers:
  cloudflare:
    acme:
      email: "myemail@gmail.com"
      storage: "/etc/traefik/certs/acme.json"
      caServer: "https://acme-v02.api.letsencrypt.org/directory"
      dnsChallenge:
        provider: cloudflare
        delayBeforeCheck: 60
        resolvers:
        - "1.1.1.1:53"
        - "8.8.8.8:53"

and my docker container (Heimdall and Filebrowser for instance) looks like:

version: "3.4"
services:
  heimdall:
    image: linuxserver/heimdall:latest
    networks:
      - traefik_public
    volumes:
      - volume:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    deploy:
      labels:
        - "traefik.enable=true"
        ## HTTP Routers
        - "traefik.http.routers.heimdall-rtr.entrypoints=https"
        - "traefik.http.routers.heimdall-rtr.rule=Host(`mydomain.com`)"
        ## Middlewares
        - "traefik.http.routers.heimdall-rtr.middlewares=chain-oauth@file"
        ## TLS
        - "traefik.http.routers.heimdall-rtr.tls=true"
        - "traefik.http.routers.heimdall-rtr.tls.certresolver=cloudflare"
        ## HTTP Services
        - "traefik.http.routers.heimdall-rtr.service=heimdall-svc"
        - "traefik.http.services.heimdall-svc.loadbalancer.server.port=80"

  filebrowser:
    image: filebrowser/filebrowser:latest
#    user: 1000:1000
    volumes:
      - /volume/media:/srv
    environment:
      - FB_BASEURL=/filebrowser
    networks:
      - traefik_public
    deploy:
      labels:
        - "traefik.enable=true"
        ## HTTP Routers
        - "traefik.http.routers.filebrowser-rtr.entrypoints=https"
        - "traefik.http.routers.filebrowser-rtr.rule=Host(`myseconddomain.com`)"
        - "traefik.http.routers.filebrowser-rtr.tls=true"
        ## Middlewares
        - "traefik.http.routers.filebrowser-rtr.middlewares=chain-oauth@file"
        ## HTTP Services
        - "traefik.http.routers.filebrowser-rtr.service=filebrowser-svc"
        - "traefik.http.services.filebrowser-svc.loadbalancer.server.port=80"

I already tried to make a change like this

        domains[0]:
          - main: mydomain.com
            sans:
            - "*.mydomain.com"
        domains[1]:
          - main: myseconddomain.com
            sans:
            - "*.myseconddomain.com"

but the error message in Traefik is:
command traefik error: field not found, node: domains[0]

are there any other solutions? thanks in advance.