I have a number of docker swarm services, deployed via docker stack
.
Most of them (regular services) are exposed to a single internal overlay network, the one which is generated when docker stack
is deployed, but some (lets call them gateway services) are also should be externally accessable (via compose-file.yml ports:
definition), which results in exposure to ingress network as well as to generated one at deploy time.
And here is the problem: when one gateway service tries to contact other gateway service, it's requests are may get routed via ingress network (and fail due to the timeout, which by my understanding is okay, as internal communcation between containers via ingress network should not happen), instead of docker stack deploy
-generated overlay network.
How to forbidd for containers of gateway services to use ingress network when communicating with each other?