Container works running standalone but not as a service in a swarm

Oh, judging by the details you provided so far there is nothing to realy work with… which led me to the understanding that your just want to share your experience with us.

Please share the service declaration in your compose.yml you use when deploying the container as a service and when deploying it as a plain container.