HTTP and TCP lodabalancer

Hey, I'm trying to loadbalance my container in Swarm which provides two ports, 8090 for TCP connections and 8080 for HTTP for REST.

Currently I'm using it like this:

  my-service:
    image: xxxxxx
    ports:
      - "8090:8090"
    networks:
      - proxy
    deploy:
      labels:
        - "traefik.http.services.my-service.loadbalancer.server.port=8080"
        - "traefik.http.routers.my-service.rule=Host(`my-service.my-domain.com`)"

I redirected exposed port 8090 to 8090, and Traefik is routing my domain to exposed 8080 port in container.

As far as I know when I'm using TCP router and config I have to configure HTTP by my self, but I didn't find an example how to do it.
I tried with config like this:

  my-service:
    image: xxxxxx
    ports:
      - "8090:8090"
    networks:
      - proxy
    deploy:
      labels:
        - "traefik.http.services.my-service.loadbalancer.server.port=8080"
        - "traefik.http.routers.my-service.rule=Host(`my-service.my-domain.com`)"
        - "traefik.tcp.routers.my-service.rule=HostSNI(`*`)"
        - "traefik.tcp.services.my-service.loadbalancer.servers.address=xx.xx.xx.xx:8090"

but then traefik was not redirecting http requests to my containers and I was getting 404 page

try 8080 port

If these are the actual compose file, you are redefining my-service instead of defining two sets of services and routers. Try another name for your routers and services in one of the compose files.