How do you access a service that is in another stack?
To do this, all you need is to make it use the same network, then they will be visible. In my case I defined a network called public
, that is referred to externally by all my stacks
docker network create -d overlay --attachable public
From there in my docker-compose.yml file I have
networks:
public:
external:
name: public
To access it, just use the service name.