docker compose network mode host

Hi,
We’ve added BLE support to our application, the service that uses the BLE support requires network_mode host.
will that make all the other services be in network_mode host as well? till today they were communicating by the services names, obviously now that its using network_mode host i cant reach it by its name.
i’ve googled a lot but couldnt find the right way to communicate between services, that one of them is using the host network.
is it possible without moving all our services to be on host network mode as well?

Daniel.

Hello, you may find this document helpful, especially the section on “Networking Types:” https://www.balena.io/docs/learn/more/masterclasses/services-masterclass/#4-networking-types
If you are using a docker-compose file, by default the services will use a bridge network, and you can specify the ones you want to be in host mode by setting the service network_mode to host or even better, just expose the necessary ports to the host using the ports keyword.