The service does not exist

Hello. I'm on Traefik. Not sure what I'm doing wrong here. I have this configuration:

version: "3.7"
services:
  gateway:
    image: traefik:latest
    restart: unless-stopped
    command:
      - "--api.dashboard=${TRAEFIK_DASHBOARD_ENABLED:-true}"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
      - "--entryPoints.web.http.redirections.entryPoint.to=web-secure"
      - "--entryPoints.web.http.redirections.entryPoint.scheme=https"
      - "--entryPoints.web-secure.address=:443"
      - "--serversTransport.insecureSkipVerify=true"
      - "--certificatesresolvers.certificato.acme.httpchallenge=true"
      - '--certificatesresolvers.certificato.acme.httpchallenge.entrypoint=web'
      - '--certificatesresolvers.certificato.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory'
      - "--certificatesresolvers.certificato.acme.email=${CLOUDFLARE_EMAIL}"
      - "--certificatesresolvers.certificato.acme.storage=/cert/acme.json"
    ports:
      - "80:80"
      - "443:443"
    networks:
      - vyzl
    env_file:
      - .env
    labels:
      - "traefik.enable=${TRAEFIK_DASHBOARD_ENABLED:-true}"
      - "traefik.http.routers.vyzl_traefik.rule=Host(`traefik.${DOMAIN}`)"
      - "traefik.http.routers.vyzl_traefik.entryPoints=web-secure"
      - "traefik.http.routers.vyzl_traefik.tls.certResolver=certificato"
      - "traefik.http.routers.vyzl_traefik.tls.domains[0].main=${DOMAIN}"
      - "traefik.http.routers.vyzl_traefik.service=vyzl_traefik"
    volumes:
      - ./data/traefik/cert:/cert
      - /var/run/docker.sock:/var/run/docker.sock
  postgres:
    image: postgres
    ports:
      - "5432:${DB_PORT}"
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE}
    networks:
      - vyzl
      - 
  redis:
    image: redis:6.2-alpine
    ports:
      - "6379:6379"
    restart: always
    networks:
      - vyzl
      
  backend:
    image: ghcr.io/uatechpeople/vyzl-backend:ghcr.io-UATechPeople-vyzl-backend-latest
    depends_on:
      - redis
      - postgres
    ports:
      - "3333:3333"
    env_file:
      - .env
    labels:
      - "traefik.enable=${API_ENABLED:-false}"
      - "traefik.http.routers.vyzl_api.rule=Host(`api.${DOMAIN}`)"
      - "traefik.http.routers.vyzl_api.entryPoints=web-secure"
      - "traefik.http.routers.vyzl_api.tls=true"
      - "traefik.http.routers.vyzl_api.tls.certResolver=certificato"
      - "traefik.http.routers.vyzl_api.tls.domains[0].main=${DOMAIN}"
      - "traefik.http.routers.vyzl_api.service=vyzl_api"
    networks:
      - vyzl

  worker:
    image: ghcr.io/uatechpeople/vyzl-worker:ghcr.io-UATechPeople-vyzlWorker-latest
    depends_on:
      - redis
      - postgres
    env_file:
      - .env
    networks:
      - vyzl

  frontend:
    image: ghcr.io/uatechpeople/vyzl-frontend:ghcr.io-UATechPeople-vyzl-frontend-latest
    depends_on:
      - worker
      - backend
    ports:
      - "4200:4200"
    env_file:
      - .env
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.vyzl_frontend.rule=Host(`frontend.${DOMAIN}`)"
      - "traefik.http.routers.vyzl_frontend.entryPoints=web-secure"
      - "traefik.http.routers.vyzl_frontend.tls=true"
      - "traefik.http.routers.vyzl_frontend.tls.certResolver=certificato"
      - "traefik.http.routers.vyzl_frontend.tls.domains[0].main=${DOMAIN}"
      - "traefik.http.routers.vyzl_frontend.service=vyzl_frontend"
    networks:
      - vyzl

networks:
  vyzl:
    driver: bridge

But, I'm getting these errors on startup:

level=error msg="the service \"vyzl_frontend@docker\" does not exist" entryPointName=web-secure routerName=vyzl_frontend@docker

level=error msg="the service \"vyzl_traefik@docker\" does not exist" entryPointName=web-secure routerName=vyzl_traefik@docker

level=error msg="the service \"vyzl_api@docker\" does not exist" entryPointName=web-secure routerName=vyzl_api@docker

The Traefik Dashboard needs a special service declaration .service=api@internal and for other services we just define .loadbalancer.server.port=.

We don't use tls.domains[0] as Traefik LetsEncrypt automatically takes the domain from .rule=Host().

Working example docker-compose.yml:

version: '3.9'

services:
  traefik:
    image: traefik:v2.9
    ports:
      - published: 80
        target: 80
        protocol: tcp
        mode: host
      - published: 443
        target: 443
        protocol: tcp
        mode: host
    networks:
      - proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /root/traefik-certificates:/traefik-certificates
    command:
      --providers.docker=true
      --providers.docker.network=proxy
      --providers.docker.exposedByDefault=false
      --entryPoints.web.address=:80
      --entryPoints.web.http.redirections.entryPoint.to=websecure
      --entryPoints.web.http.redirections.entryPoint.scheme=https
      --entryPoints.websecure.address=:443
      --entryPoints.websecure.http.tls=true
      --entryPoints.websecure.http.tls.certResolver=myresolver
      --api.debug=true
      --api.dashboard=true
      --log.level=DEBUG
      --accesslog=true
      --certificatesResolvers.myresolver.acme.email=mail@example.com
      --certificatesResolvers.myresolver.acme.tlschallenge=true
      --certificatesResolvers.myresolver.acme.storage=/traefik-certificates/acme.json
    labels:
      - traefik.enable=true
      - traefik.http.routers.mydashboard.entrypoints=websecure
      - traefik.http.routers.mydashboard.rule=Host(`traefik.example.com`)
      - traefik.http.routers.mydashboard.tls.certresolver=myresolver
      - traefik.http.routers.mydashboard.service=api@internal
      - traefik.http.routers.mydashboard.middlewares=myauth
      - traefik.http.middlewares.myauth.basicauth.users=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/

  whoami:
    image: traefik/whoami:v1.8
    networks:
      - proxy
    labels:
      - traefik.enable=true
      - traefik.http.routers.mywhoami.entrypoints=websecure
      - traefik.http.routers.mywhoami.rule=Host(`example.com`) || Host(`www.example.com`)
      - traefik.http.services.mywhoami.loadbalancer.server.port=80

networks:
  proxy:
    name: proxy