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
|
|
|
|
2024-02-06 04:34:15 -05:00
|
|
|
const httpAuthUser = 'overleaf'
|
2021-05-19 08:07:10 -04:00
|
|
|
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: {
|
2024-04-25 08:56:00 -04:00
|
|
|
url: `http://127.0.0.1:23002`,
|
2022-08-09 08:03:30 -04:00
|
|
|
},
|
|
|
|
analytics: {
|
2024-04-25 08:56:00 -04:00
|
|
|
url: `http://127.0.0.1:23050`,
|
2022-08-09 08:03:30 -04:00
|
|
|
},
|
2021-05-19 08:07:10 -04:00
|
|
|
recurly: {
|
2024-04-25 08:56:00 -04:00
|
|
|
url: 'http://127.0.0.1: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: {
|
2024-04-25 08:56:00 -04:00
|
|
|
url: `http://127.0.0.1:25000`,
|
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
|
|
|
saml: undefined,
|
2021-05-19 08:07:10 -04:00
|
|
|
|
2024-07-03 04:40:22 -04:00
|
|
|
contentful: {
|
|
|
|
spaceId: 'a',
|
|
|
|
deliveryToken: 'b',
|
|
|
|
previewToken: 'c',
|
|
|
|
deliveryApiHost: 'cdn.contentful.com',
|
|
|
|
previewApiHost: 'preview.contentful.com',
|
|
|
|
},
|
2023-02-16 05:41:58 -05:00
|
|
|
|
|
|
|
twoFactorAuthentication: {
|
|
|
|
accessTokenEncryptorOptions: {
|
|
|
|
cipherPasswords: {
|
2023-02-16 07:21:40 -05:00
|
|
|
'2023.1-v3': 'this-is-a-weak-secret-for-tests-web-2023.1-v3',
|
2023-02-16 05:41:58 -05:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
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)) {
|
2024-04-25 08:56:00 -04:00
|
|
|
module.exports.redis[redisKey].host = process.env.REDIS_HOST || '127.0.0.1'
|
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.mergeWith = function (overrides) {
|
|
|
|
return merge(overrides, module.exports)
|
2021-07-14 04:14:22 -04:00
|
|
|
}
|