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: {
|
2022-08-09 08:03:30 -04:00
|
|
|
thirdPartyDataStore: {
|
|
|
|
url: `http://localhost:23002`,
|
|
|
|
},
|
|
|
|
analytics: {
|
|
|
|
url: `http://localhost:23050`,
|
|
|
|
},
|
2021-07-20 05:26:23 -04:00
|
|
|
project_history: {
|
|
|
|
sendProjectStructureOps: true,
|
|
|
|
initializeHistoryForNewProjects: true,
|
|
|
|
displayHistoryForNewProjects: true,
|
2022-08-09 08:03:30 -04:00
|
|
|
url: `http://localhost:23054`,
|
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: {
|
2022-08-09 08:03:30 -04:00
|
|
|
url: 'http://localhost:26034',
|
2021-05-19 08:07:10 -04:00
|
|
|
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: {
|
2022-08-09 08:03:30 -04:00
|
|
|
url: `http://localhost:25000`,
|
2021-07-20 05:26:23 -04:00
|
|
|
user: 'overleaf',
|
|
|
|
pass: 'password',
|
2021-05-19 08:07:10 -04:00
|
|
|
},
|
|
|
|
|
2021-07-20 05:26:23 -04:00
|
|
|
v1_history: {
|
2022-08-09 08:03:30 -04:00
|
|
|
url: `http://localhost:23100/api`,
|
2021-07-20 05:26:23 -04:00
|
|
|
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
|
|
|
}
|