I have two docker compose files, for example backend and monitoring. I need to create communication between them. It is possible using same network, and docs telling me to create network in one file and then use
external: true
in another. But I want possibility to run only backend or only monitoring. And of course I want them to communicate if they both are running.
I can create the network with
docker network create some_network
and then run one or another, or both of them but are there some better ways?