2 ms·
I'm a bit curious as to why they had the MongoDB docker container running with the 27017 port mapped in the first place, maybe for testing? You don't need to m
by Saris 5y ago
I'm a bit curious as to why they had the MongoDB docker container running with the 27017 port mapped in the first place, maybe for testing?
You don't need to map ports for inter-container communications, and maybe that's where some of the confusion comes in for people using docker.
I have noticed a few friends who have been playing with docker for home server stuff thinking that they need to map ports for everything, just to get containers in a stack talking to each other.
At the same time docker really shouldn't be messing with the hosts incoming firewall rules.
And MongoDB really should force auth by default.
- Cpoll 5y ago> ufw firewall ... kept on a strict allowlist with only my internal servers > I switched the MongoDB cluster over to the new servers. It sounds like they had multiple Mongo nodes on separate machines, communicating over the internet. Presumably the application(s) are also on separate machines and would need to communicate with Mongo. I think `docker network` has options to create a network across Docker daemon hosts? But that has some tradeoffs, I'm sure.