mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[misc] mongodb: use the new db connector by default
mongojs was enabling it by default as well.
This commit is contained in:
parent
c337cf1c4f
commit
16ef0d9610
2 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
|||
const Settings = require('settings-sharelatex')
|
||||
const { MongoClient, ObjectId } = require('mongodb')
|
||||
|
||||
const clientPromise = MongoClient.connect(Settings.mongo.url)
|
||||
const clientPromise = MongoClient.connect(
|
||||
Settings.mongo.url,
|
||||
Settings.mongo.options
|
||||
)
|
||||
|
||||
async function healthCheck() {
|
||||
const internalDb = (await clientPromise).db()
|
||||
|
|
|
@ -174,6 +174,10 @@ module.exports = {
|
|||
dispatcherCount: process.env.DISPATCHER_COUNT,
|
||||
|
||||
mongo: {
|
||||
options: {
|
||||
useUnifiedTopology:
|
||||
(process.env.MONGO_USE_UNIFIED_TOPOLOGY || 'true') === 'true'
|
||||
},
|
||||
url:
|
||||
process.env.MONGO_CONNECTION_STRING ||
|
||||
`mongodb://${process.env.MONGO_HOST || '127.0.0.1'}/sharelatex`
|
||||
|
|
Loading…
Reference in a new issue