2014-04-28 15:45:59 +00:00
|
|
|
http = require('http')
|
|
|
|
http.globalAgent.maxSockets = 300
|
|
|
|
|
2018-09-28 10:50:38 +00:00
|
|
|
Settings =
|
2014-04-28 15:45:59 +00:00
|
|
|
internal:
|
|
|
|
docstore:
|
|
|
|
port: 3016
|
2017-12-29 08:12:31 +00:00
|
|
|
host: process.env['LISTEN_ADDRESS'] or "localhost"
|
2014-04-28 15:45:59 +00:00
|
|
|
|
2018-09-28 10:50:38 +00:00
|
|
|
mongo:{}
|
2015-06-01 21:24:40 +00:00
|
|
|
|
2015-10-16 09:13:54 +00:00
|
|
|
docstore:
|
|
|
|
healthCheck:
|
2018-09-28 11:39:11 +00:00
|
|
|
project_id: process.env['HEALTH_CHECK_PROJECT_ID']
|
2015-11-06 12:42:44 +00:00
|
|
|
|
2015-11-09 15:24:21 +00:00
|
|
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
2016-11-28 16:51:43 +00:00
|
|
|
|
2018-09-28 10:50:38 +00:00
|
|
|
if process.env['MONGO_CONNECTION_STRING']?
|
|
|
|
Settings.mongo.url = process.env['MONGO_CONNECTION_STRING']
|
|
|
|
else if process.env['MONGO_HOST']?
|
|
|
|
Settings.mongo.url = "mongodb://#{process.env['MONGO_HOST']}/sharelatex"
|
|
|
|
else
|
|
|
|
Settings.mongo.url = "mongodb://127.0.0.1/sharelatex"
|
|
|
|
|
2016-11-28 16:51:43 +00:00
|
|
|
if process.env['AWS_ACCESS_KEY_ID']? and process.env['AWS_SECRET_ACCESS_KEY']? and process.env['AWS_BUCKET']?
|
|
|
|
Settings.docstore.s3 =
|
|
|
|
key: process.env['AWS_ACCESS_KEY_ID']
|
|
|
|
secret: process.env['AWS_SECRET_ACCESS_KEY']
|
2018-05-23 11:20:37 +00:00
|
|
|
bucket: process.env['AWS_BUCKET']
|
2018-09-28 10:50:38 +00:00
|
|
|
|
|
|
|
module.exports = Settings
|