I’ve been using docker swarm mode + DAB and I would like to know which is the best way of communicating services living in different stacks?. Basically, when you deploy a stack a new network is created each time which seems to be specifically for that stack. Inside that stack you can have services communicating to each other doing things like http://serviceA:3000 or http://serviceB:3000 (internal load balancer + DNS does the rest for you) but what if I need to communicate to a service leaving in another stack?? The other stack itself is even running in a different network!
I tried defining an external network in my 2 .yml (two stacks I was working on) so that both stacks would connect to the same network but I’m getting this warning:
WARNING: Unsupported top level key ‘networks’ - ignoring
And then when I deploy my DAB a new network with a prefix (name of the stack) is always created.
I would really like to be able to communicate with services living in other stacks! Also, how about a command for listing existing stacks! That would be useful too.
Hope someone knows the answer, or, is willing to take this into account for the experimental features!