Port exposure issue using traefik

I'm uploading a linux server with traefik, docker swarm with docker compose and facing a problem with publishing ports.

I have two docker-compose, one to install traefik and one to install the project's apps: namely mongo, elasticksearch and the gravitee platform from gravitee.io.

The gravitee platform is an API Management platform composed of a backend gateway that runs on port 8082; another services api backend called api-management, which runs on port 8083; an admin frontend, called management api ui, which runs on port 8080 inside the container but exposes port 8084; and finally, another fronten, called ui portal, which also runs on port 8080 inside the container but exposes on 8085.

In traefik compose a traefik-public external network was created and in the project's docker compose another network traefik-public network was created with driver: overlay external in addition to other internal networks.

What's happening?

In the two interface projects I am not able to expose port 8084 or port 8085 so that traefik does not ocnsegue to direct the subdomains, that is, I cannot access the application from its DNS, I can only access it by IP. Through the server IP I can access port 8084 and 8085. The services that run on port 8082 and 8083 work.

Check the following pattern, when the internal port is the same as the exposed port DNS resolve; when they are different they do not resolve by DNS. Example:

8082:8082 (works)
8083:8083 (works)
8084:8080 (does not work)
8085:8080 (does not work)

I've tried in every way to find a solution to this problem and I haven't found it.

I note that the ones that don't work are frontends.