Skip to content

Commit b6d8932

Browse files
mongoKartnorareidy
andauthored
DOCSP-47829 - Docker directConnection note (#99)
Co-authored-by: Nora Reidy <[email protected]>
1 parent 6a5b9f7 commit b6d8932

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dbx/docker-replica-set.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
.. note:: Replica Set in Docker
1+
When a replica set runs in Docker, it might expose only one MongoDB endpoint.
2+
In this case, the replica set is not discoverable. Specifying ``directConnection=false`` in your connection URI,
3+
or leaving this option unset, can prevent your application from connecting to it.
24

3-
To connect to a replica set running in one or more Docker containers,
4-
specify ``directConnection=true`` in your connection URI.
5+
In a test or development environment, you can connect to the replica set by specifying
6+
``directConnection=true``. In a production environment, we
7+
recommend configuring the cluster to make each MongoDB instance accessible outside of
8+
the Docker virtual network.

0 commit comments

Comments
 (0)