overleaf/services/docstore/config/settings.defaults.coffee

25 lines
671 B
CoffeeScript
Raw Normal View History

http = require('http')
http.globalAgent.maxSockets = 300
module.exports = Settings =
internal:
docstore:
port: 3016
host: process.env['LISTEN_ADDRESS'] or "localhost"
mongo:
url: "#{process.env['MONGO_CONNECTION_STRING'] or 'mongodb://127.0.0.1/sharelatex'}"
2015-06-01 17:24:40 -04:00
docstore:
healthCheck:
project_id: ""
2015-11-06 07:42:44 -05:00
max_doc_length: 2 * 1024 * 1024 # 2mb
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 07:20:37 -04:00
bucket: process.env['AWS_BUCKET']
console.log "SETTINGS"
console.log Settings.docstore.s3