File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,17 @@ To connect to a replica set, you can either:
258
258
- Explicitly specify the replica set name and members in the connection
259
259
string.
260
260
261
+ .. important::
262
+
263
+ When a replica set runs in Docker, it might expose only one
264
+ MongoDB endpoint. In this case, the replica set is not discoverable, and specifying
265
+ ``directConnection=false`` can prevent your application from connecting to it.
266
+
267
+ In a test or development environment, you can connect to the replica set by specifying
268
+ ``directConnection=true`` in your connection URI. In a production environment, we
269
+ recommend configuring the cluster to make each MongoDB instance accessible outside of
270
+ the Docker virtual network.
271
+
261
272
Option 1: DNS Seedlist Format
262
273
`````````````````````````````
263
274
You can’t perform that action at this time.
0 commit comments