If I have the below docker-compose-yml file, is it then possible to get the IP addresses of the mongodb and redis contains and have them in the XXX and YYY place holders?
When you use Docker container links, Docker provides the linked names as DNS names. (If you use the newer private-network system, the container names themselves are DNS names.) So it should work to
In my experience you don’t usually need to know containers’ IP addresses (and like all IP addresses they’re prone to changing), but more complicated setups can require some more involved configuration.