How to Connect Host Mongodb inside docker container .env file?

Hello Developer,

Recently I am using docker container where I have installed nodejs project, But I did not install mongodb Database because we have already installed mongodb in our host server so I need to connect it using mongodb url, So I put mongodb url in my .env file. But it is not connecting but I put mongodb cloud url but it works. Is there any way to connect it using .env file ?