Skip to content

DOCSP-48699-directConnection-Docker-admonition #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions source/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,17 @@ To connect to a replica set, you can either:
- Explicitly specify the replica set name and members in the connection
string.

.. important::

When a replica set runs in Docker, it might expose only one
MongoDB endpoint. In this case, the replica set is not discoverable, and specifying
``directConnection=false`` can prevent your application from connecting to it.

In a test or development environment, you can connect to the replica set by specifying
``directConnection=true`` in your connection URI. In a production environment, we
recommend configuring the cluster to make each MongoDB instance accessible outside of
the Docker virtual network.

Option 1: DNS Seedlist Format
`````````````````````````````

Expand Down