I have a service behind gluetun via the network_mode and depends_on .yaml settings, as everything needs to be filtered through a VPN.
I've recently added a 2nd service that should also be exclusively through gluetun, no leaks. The problem is, this service is reliant on 2 other docker networks that it's 2 "sister" services are on (1 each). Docker doesn't let you use exclusive network_mode and also define networks, as seen in the error below.
I don't want to connect gluetun to these other 2 networks as Docker networks are bi-directional and I'm trying to minimize unnecessary access and reduce attack vectors.
Any recommendations on the best path forward?
ERROR:
service xxxxx declares mutually exclusive `network_mode` and `networks`: invalid compose project