2021-07-20 05:26:23 -04:00
|
|
|
const { merge } = require('@overleaf/settings/merge')
|
|
|
|
const baseApp = require('../../../config/settings.overrides.saas')
|
|
|
|
const baseTest = require('./settings.test.defaults')
|
2021-05-19 08:07:10 -04:00
|
|
|
|
|
|
|
const httpAuthUser = 'sharelatex'
|
|
|
|
const httpAuthPass = 'password'
|
|
|
|
const httpAuthUsers = {}
|
|
|
|
httpAuthUsers[httpAuthUser] = httpAuthPass
|
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
const overrides = {
|
2021-05-19 08:07:10 -04:00
|
|
|
enableSubscriptions: true,
|
|
|
|
|
|
|
|
apis: {
|
2021-07-20 05:26:23 -04:00
|
|
|
project_history: {
|
|
|
|
sendProjectStructureOps: true,
|
|
|
|
initializeHistoryForNewProjects: true,
|
|
|
|
displayHistoryForNewProjects: true,
|
|
|
|
url: `http://localhost:3054`,
|
2021-05-19 08:07:10 -04:00
|
|
|
},
|
2021-07-20 05:26:23 -04:00
|
|
|
|
2021-05-19 08:07:10 -04:00
|
|
|
recurly: {
|
|
|
|
url: 'http://localhost:6034',
|
|
|
|
subdomain: 'test',
|
|
|
|
apiKey: 'private-nonsense',
|
2021-06-08 09:03:39 -04:00
|
|
|
webhookUser: 'recurly',
|
|
|
|
webhookPass: 'webhook',
|
2021-05-19 08:07:10 -04:00
|
|
|
},
|
2021-07-20 05:26:23 -04:00
|
|
|
|
2021-07-14 04:14:22 -04:00
|
|
|
tpdsworker: {
|
|
|
|
// Disable tpdsworker in CI.
|
|
|
|
url: undefined,
|
|
|
|
},
|
2021-05-19 08:07:10 -04:00
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
v1: {
|
|
|
|
url: 'http://localhost:5000',
|
|
|
|
user: 'overleaf',
|
|
|
|
pass: 'password',
|
2021-05-19 08:07:10 -04:00
|
|
|
},
|
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
v1_history: {
|
|
|
|
url: `http://localhost:3100/api`,
|
|
|
|
user: 'overleaf',
|
|
|
|
pass: 'password',
|
2021-05-19 08:07:10 -04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
oauthProviders: {
|
|
|
|
provider: {
|
|
|
|
name: 'provider',
|
|
|
|
},
|
|
|
|
collabratec: {
|
|
|
|
name: 'collabratec',
|
|
|
|
},
|
|
|
|
google: {
|
|
|
|
name: 'google',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2021-07-14 04:14:22 -04:00
|
|
|
overleaf: {
|
|
|
|
oauth: undefined,
|
|
|
|
},
|
|
|
|
saml: undefined,
|
2021-05-19 08:07:10 -04:00
|
|
|
|
2021-07-14 04:14:22 -04:00
|
|
|
// Disable contentful module.
|
|
|
|
contentful: undefined,
|
2021-07-20 05:26:23 -04:00
|
|
|
}
|
2021-07-14 04:14:22 -04:00
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
module.exports = baseApp.mergeWith(baseTest.mergeWith(overrides))
|
2021-07-14 04:14:22 -04:00
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
for (const redisKey of Object.keys(module.exports.redis)) {
|
|
|
|
module.exports.redis[redisKey].host = process.env.REDIS_HOST || 'localhost'
|
|
|
|
}
|
2021-07-14 04:14:22 -04:00
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
module.exports.mergeWith = function (overrides) {
|
|
|
|
return merge(overrides, module.exports)
|
2021-07-14 04:14:22 -04:00
|
|
|
}
|