Cant seem to figure this out: read /traefik.yaml: is a directory

After hours of troubleshooting I am completely out of ideas and tired of this error.

This is my compose:

secrets:
  cf-token:
    file: ./cf-token
services:
  traefik:
    image: traefik:latest 
    container_name: traefik
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    secrets:
      - cf-token 
    env_file:
      - .env
    networks:
       proxy:
    ports:
      - 80:80
      - 443:443
    environment:
      - TRAEFIK_DASHBOARD_CREDENTIALS=${TRAEFIK_DASHBOARD_CREDENTIALS}
      - CF_DNS_API_TOKEN_FILE=/run/secrets/cf-token 
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /home/docker-compose/traefik/traefik.yaml:/traefik.yaml:ro
      - /home/docker-compose/traefik/acme.json:/acme.json
      - /home/docker-compose/traefik/config.yaml:/config.yaml:ro
      - /home/docker-compose/traefik/logs:/var/log/traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.entrypoints=http"
      - "traefik.http.routers.traefik.rule=Host(`traefik.host.com`)"
      - "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_DASHBOARD_CREDENTIALS}"
      - "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(`traefik.host.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=host.com"
      - "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.host.com"
      - "traefik.http.routers.traefik-secure.service=api@internal"
networks:
  proxy:
    external: true

ls -l output:

But I keep getting these errors:
image

Use 3 backticks before and after code/config to make it more readable and preserve spacing, which is important in yaml.

Maybe try to add:

services:
  traefik:
    image: traefik:latest 
    command:
      - --configFile=/traefik.yaml

Also check inside the container:

docker exec -it <traefik-cid> sh
ls -la /

Seems to work better I guess:

Output

-rw-r--r--    1 1000     1000          1401 Jun  9 10:13 traefik.yaml

Not a directory and I have no more issues in logs:

No log line matching the '' filter