2014-02-12 05:40:42 -05:00
|
|
|
Path = require('path')
|
|
|
|
http = require('http')
|
|
|
|
http.globalAgent.maxSockets = 300
|
|
|
|
|
|
|
|
module.exports =
|
|
|
|
internal:
|
|
|
|
documentupdater:
|
2017-12-29 03:13:16 -05:00
|
|
|
host: process.env["LISTEN_ADDRESS"] or "localhost"
|
2014-02-12 05:40:42 -05:00
|
|
|
port: 3003
|
|
|
|
|
|
|
|
apis:
|
|
|
|
web:
|
2019-02-01 15:10:47 -05:00
|
|
|
url: "http://#{process.env['WEB_API_HOST'] or process.env['WEB_HOST'] or "localhost"}:#{process.env['WEB_API_PORT'] or process.env['WEB_PORT'] or 3000}"
|
2019-09-28 06:07:33 -04:00
|
|
|
user: process.env['WEB_API_USER'] or "sharelatex"
|
|
|
|
pass: process.env['WEB_API_PASSWORD'] or "password"
|
2014-02-26 10:56:52 -05:00
|
|
|
trackchanges:
|
2017-12-29 03:13:16 -05:00
|
|
|
url: "http://#{process.env["TRACK_CHANGES_HOST"] or "localhost"}:3015"
|
2017-09-29 07:44:36 -04:00
|
|
|
project_history:
|
2018-02-15 11:28:40 -05:00
|
|
|
enabled: true
|
2017-12-29 03:13:16 -05:00
|
|
|
url: "http://#{process.env["PROJECT_HISTORY_HOST"] or "localhost"}:3054"
|
2014-02-12 05:40:42 -05:00
|
|
|
|
|
|
|
redis:
|
2019-02-01 14:40:20 -05:00
|
|
|
|
2019-07-03 05:21:25 -04:00
|
|
|
pubsub:
|
|
|
|
host: process.env['PUBSUB_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
|
|
|
port: process.env['PUBSUB_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
|
|
|
|
password: process.env["PUBSUB_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2019-10-16 03:44:08 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env['REDIS_MAX_RETRIES_PER_REQUEST'] or "20")
|
2019-10-04 06:53:14 -04:00
|
|
|
|
2017-05-03 11:27:32 -04:00
|
|
|
history:
|
2018-12-05 10:11:24 -05:00
|
|
|
port: process.env["HISTORY_REDIS_PORT"] or process.env["REDIS_PORT"] or "6379"
|
|
|
|
host: process.env["HISTORY_REDIS_HOST"] or process.env["REDIS_HOST"] or "localhost"
|
|
|
|
password: process.env["HISTORY_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2019-10-16 03:44:08 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env['REDIS_MAX_RETRIES_PER_REQUEST'] or "20")
|
2017-05-03 11:27:32 -04:00
|
|
|
key_schema:
|
2019-02-01 14:40:20 -05:00
|
|
|
uncompressedHistoryOps: ({doc_id}) -> "UncompressedHistoryOps:{#{doc_id}}"
|
|
|
|
docsWithHistoryOps: ({project_id}) -> "DocsWithHistoryOps:{#{project_id}}"
|
2017-09-29 07:44:36 -04:00
|
|
|
|
|
|
|
project_history:
|
2019-09-13 10:06:42 -04:00
|
|
|
port: process.env["NEW_HISTORY_REDIS_PORT"] or "6379"
|
|
|
|
host: process.env["NEW_HISTORY_REDIS_HOST"]
|
|
|
|
password: process.env["NEW_HISTORY_REDIS_PASSWORD"] or ""
|
|
|
|
key_schema:
|
|
|
|
projectHistoryOps: ({project_id}) -> "ProjectHistory:Ops:{#{project_id}}"
|
|
|
|
projectHistoryFirstOpTimestamp: ({project_id}) -> "ProjectHistory:FirstOpTimestamp:{#{project_id}}"
|
|
|
|
redisOptions:
|
|
|
|
keepAlive: 100
|
|
|
|
|
2017-05-03 11:27:32 -04:00
|
|
|
lock:
|
2018-12-05 10:11:24 -05:00
|
|
|
port: process.env["LOCK_REDIS_PORT"] or process.env["REDIS_PORT"] or "6379"
|
|
|
|
host: process.env["LOCK_REDIS_HOST"] or process.env["REDIS_HOST"] or "localhost"
|
|
|
|
password: process.env["LOCK_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2019-10-16 03:44:08 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env['REDIS_MAX_RETRIES_PER_REQUEST'] or "20")
|
2017-05-03 11:27:32 -04:00
|
|
|
key_schema:
|
2019-02-01 14:40:20 -05:00
|
|
|
blockingKey: ({doc_id}) -> "Blocking:{#{doc_id}}"
|
|
|
|
|
|
|
|
documentupdater:
|
|
|
|
port: process.env["DOC_UPDATER_REDIS_PORT"] or process.env["REDIS_PORT"] or "6379"
|
|
|
|
host: process.env["DOC_UPDATER_REDIS_HOST"] or process.env["REDIS_HOST"] or "localhost"
|
|
|
|
password: process.env["DOC_UPDATER_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2019-10-16 03:44:08 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env['REDIS_MAX_RETRIES_PER_REQUEST'] or "20")
|
2019-02-01 14:40:20 -05:00
|
|
|
key_schema:
|
|
|
|
blockingKey: ({doc_id}) -> "Blocking:{#{doc_id}}"
|
|
|
|
docLines: ({doc_id}) -> "doclines:{#{doc_id}}"
|
|
|
|
docOps: ({doc_id}) -> "DocOps:{#{doc_id}}"
|
|
|
|
docVersion: ({doc_id}) -> "DocVersion:{#{doc_id}}"
|
|
|
|
docHash: ({doc_id}) -> "DocHash:{#{doc_id}}"
|
|
|
|
projectKey: ({doc_id}) -> "ProjectId:{#{doc_id}}"
|
|
|
|
docsInProject: ({project_id}) -> "DocsIn:{#{project_id}}"
|
|
|
|
ranges: ({doc_id}) -> "Ranges:{#{doc_id}}"
|
|
|
|
unflushedTime: ({doc_id}) -> "UnflushedTime:{#{doc_id}}"
|
|
|
|
pathname: ({doc_id}) -> "Pathname:{#{doc_id}}"
|
|
|
|
projectHistoryId: ({doc_id}) -> "ProjectHistoryId:{#{doc_id}}"
|
2019-11-15 11:53:16 -05:00
|
|
|
projectHistoryType: ({doc_id}) -> "ProjectHistoryType:{#{doc_id}}"
|
2019-02-01 14:40:20 -05:00
|
|
|
projectState: ({project_id}) -> "ProjectState:{#{project_id}}"
|
|
|
|
pendingUpdates: ({doc_id}) -> "PendingUpdates:{#{doc_id}}"
|
2019-04-22 20:02:48 -04:00
|
|
|
lastUpdatedBy: ({doc_id}) -> "lastUpdatedBy:{#{doc_id}}"
|
|
|
|
lastUpdatedAt: ({doc_id}) -> "lastUpdatedAt:{#{doc_id}}"
|
2019-07-03 05:21:25 -04:00
|
|
|
pendingUpdates: ({doc_id}) -> "PendingUpdates:{#{doc_id}}"
|
2019-09-25 11:42:49 -04:00
|
|
|
flushAndDeleteQueue: () -> "DocUpdaterFlushAndDeleteQueue"
|
2019-11-15 11:53:16 -05:00
|
|
|
|
2015-11-06 07:52:03 -05:00
|
|
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
2014-02-12 05:40:42 -05:00
|
|
|
|
2019-01-25 12:24:19 -05:00
|
|
|
dispatcherCount: process.env["DISPATCHER_COUNT"]
|
|
|
|
|
2014-02-12 05:40:42 -05:00
|
|
|
mongo:
|
2019-08-07 10:44:57 -04:00
|
|
|
url : process.env['MONGO_CONNECTION_STRING'] || "mongodb://#{process.env['MONGO_HOST'] or '127.0.0.1'}/sharelatex"
|
2019-03-05 12:34:27 -05:00
|
|
|
|
|
|
|
sentry:
|
2019-07-22 07:20:06 -04:00
|
|
|
dsn: process.env.SENTRY_DSN
|
|
|
|
|
|
|
|
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
|
2019-09-30 10:35:05 -04:00
|
|
|
|
|
|
|
continuousBackgroundFlush: process.env['CONTINUOUS_BACKGROUND_FLUSH'] or false
|
2019-10-01 10:01:53 -04:00
|
|
|
|
2019-11-15 11:53:16 -05:00
|
|
|
smoothingOffset: process.env['SMOOTHING_OFFSET'] or 1000 # milliseconds
|
2019-11-25 08:36:25 -05:00
|
|
|
|
|
|
|
disableDoubleFlush: process.env['DISABLE_DOUBLE_FLUSH'] or false # don't flush track-changes for projects using project-history
|