# Connecting an application to a MongoDB running in a remote docker container

**URL:** <https://discuss.circleci.com/t/connecting-an-application-to-a-mongodb-running-in-a-remote-docker-container/42600>\
**Category:** Build Environment\
**Tags:** support, docker, mongo, circle-yml\
**Created:** [January 12, 2022, 10:08am UTC](https://discuss.circleci.com/t/connecting-an-application-to-a-mongodb-running-in-a-remote-docker-container/42600 "2022-01-12T10:08:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robertito1](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/robertito1/32/29166_2.png) [@Robertito1](https://discuss.circleci.com/u/Robertito1)\
**Post date:** [January 12, 2022, 10:08am UTC](https://discuss.circleci.com/t/connecting-an-application-to-a-mongodb-running-in-a-remote-docker-container/42600/1 "2022-01-12T10:08:41Z")

</div>

Hello guys, I am new to circle ci. I am trying to setup a pipleline to run the jest tests, for the tests to run the app connects to a remote docker image of the mongoDB but for some reason the app is unable to connect, I can tell that the remote docker containers are running using `docker-compose ps -a` but for some reason the app is still unable to connect to the DB the error is a connection timeout the db expects the app to connect from the localhost

The Job

 ![Screenshot_it](https://global.discourse-cdn.com/circleci/original/3X/8/1/81f0e111d53e08b38506d8b1460d00a8ececb49e.png)
