Ports not exposed when deploying a stack in swarm

Hello All,

I am facing issue with the stack service when deployed in swarm mode, ports are not getting exposed.
But when spinning the container from image using ‘docker run’ command ports get exposed properly.

How to debug this kind of issue?

Please help…