-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Support passing extra connection options to the Mongo driver #10529
Conversation
I can't see anywhere obvious to document this. Any pointers? |
Have a look at Rocket.Chat/docs. Best place would be somewhere under “Installing and Updating” :) |
server/startup/serverRunning.js
Outdated
@@ -13,6 +13,12 @@ Meteor.startup(function() { | |||
} | |||
} | |||
|
|||
var mongoOptionStr = process.env.MONGO_OPTIONS; | |||
if (typeof(mongoOptionStr) !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with typeof mongoOptionStr
to stay consistent with the rest of our codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at how Mongo.setConnectionOptions works, looks like we cannot call it multiple times.. since we're calling it already, I'll ask you to change there to merge the options received from process.env.MONGO_OPTIONS
- Remove brackets around `typeof` call for consistency with other code - Use `let` instead of `var`
…hat into mongo-connection-options
@sampaiodiego Done. |
Documentation PR at https://github.com/RocketChat/docs/pull/707 |
@graywolf336 / @sampaiodiego any chance you could review this today please? |
Fixes #10526