The engine will link the containers together with DNS, so if you have a service called
myapp in your
docker-compose.yml then you should be able to access it simply using
http://myapp/ from within the other container. It may also be a good idea to specify that your dash-based service
depends_on the web app service, so that it is not started until after the server container is up and healthy.
Another issue that you might run across is that if your server is only binding to localhost then you still will not be able to reach it from another container, as each container’s loopback interface is private to it (unless you use
network: host, which I would advise against). You probably want to tell your server to bind to all if the container’s interfaces (usually by specifying
0.0.0.0 as the listen address) so that it can be reached across the virtual network between the containers.’