Web service on Docker deployments is exposed even if port is not specified (for Traefik usage)

Not sure if I understand your question

The ports property is just to expose a port, but if you don’t expose anything, the container still has an open port (where NodeJS is running), and Traefik can connect to it internally through Docker’s networking

Through a Traefik label you can specify the port where Traefik should connect to, here’s how Wappler do it:

labels:
  - 'traefik.http.services.my-project__staging_web.loadbalancer.server.port=3000

Also check this reply of mine if it’s useful, the topic is hidden: