MongoDB integration with NodeRed

How are you addressing mongodb from node-red? For example, I believe you can't use localhost from within a container. Personally I only use Docker when there is a good reason, it just makes life complicated otherwise.