2019-01-22 10:50:34 -05:00
|
|
|
settings =
|
2014-11-07 12:38:12 -05:00
|
|
|
redis:
|
2019-07-03 04:55:16 -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-10 04:49:24 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env["PUBSUB_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
|
2019-07-03 04:55:16 -04:00
|
|
|
|
2017-05-02 10:51:17 -04:00
|
|
|
realtime:
|
2018-12-05 09:42:16 -05:00
|
|
|
host: process.env['REAL_TIME_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
|
|
|
port: process.env['REAL_TIME_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
|
|
|
|
password: process.env["REAL_TIME_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2017-05-02 10:51:17 -04:00
|
|
|
key_schema:
|
2019-02-04 04:47:11 -05:00
|
|
|
clientsInProject: ({project_id}) -> "clients_in_project:{#{project_id}}"
|
|
|
|
connectedUser: ({project_id, client_id})-> "connected_user:{#{project_id}}:#{client_id}"
|
2019-10-10 04:49:24 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env["REAL_TIME_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
|
2017-05-02 10:51:17 -04:00
|
|
|
|
|
|
|
documentupdater:
|
2018-12-05 09:42:16 -05:00
|
|
|
host: process.env['DOC_UPDATER_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
|
|
|
port: process.env['DOC_UPDATER_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
|
|
|
|
password: process.env["DOC_UPDATER_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2017-05-02 10:51:17 -04:00
|
|
|
key_schema:
|
2019-02-04 04:47:11 -05:00
|
|
|
pendingUpdates: ({doc_id}) -> "PendingUpdates:{#{doc_id}}"
|
2019-10-10 04:49:24 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env["DOC_UPDATER_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
|
2017-05-10 10:52:35 -04:00
|
|
|
|
2019-01-22 11:44:39 -05:00
|
|
|
websessions:
|
|
|
|
host: process.env['WEB_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
|
|
|
|
port: process.env['WEB_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
|
|
|
|
password: process.env["WEB_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
|
2019-10-10 04:49:24 -04:00
|
|
|
maxRetriesPerRequest: parseInt(process.env["WEB_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
|
2017-05-10 10:52:35 -04:00
|
|
|
|
2014-11-07 12:38:12 -05:00
|
|
|
internal:
|
|
|
|
realTime:
|
|
|
|
port: 3026
|
2017-12-29 03:15:32 -05:00
|
|
|
host: process.env['LISTEN_ADDRESS'] or "localhost"
|
2015-03-03 12:15:19 -05:00
|
|
|
user: "sharelatex"
|
|
|
|
pass: "password"
|
2014-11-07 12:38:12 -05:00
|
|
|
|
2014-11-10 06:27:08 -05:00
|
|
|
apis:
|
|
|
|
web:
|
2019-02-01 14:27:56 -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-02-01 12:25:45 -05:00
|
|
|
user: process.env['WEB_API_USER'] or "sharelatex"
|
|
|
|
pass: process.env['WEB_API_PASSWORD'] or "password"
|
2014-11-12 10:54:55 -05:00
|
|
|
documentupdater:
|
2018-10-19 14:42:33 -04:00
|
|
|
url: "http://#{process.env['DOCUMENT_UPDATER_HOST'] or process.env['DOCUPDATER_HOST'] or "localhost"}:3003"
|
2014-11-10 06:27:08 -05:00
|
|
|
|
2014-11-07 12:38:12 -05:00
|
|
|
security:
|
2018-12-03 09:05:03 -05:00
|
|
|
sessionSecret: process.env['SESSION_SECRET'] or "secret-please-change"
|
2014-11-07 12:38:12 -05:00
|
|
|
|
2018-12-03 09:05:03 -05:00
|
|
|
cookieName: process.env['COOKIE_NAME'] or "sharelatex.sid"
|
2015-12-01 06:05:49 -05:00
|
|
|
|
2018-12-04 09:06:39 -05:00
|
|
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
|
|
|
|
2020-03-24 04:12:12 -04:00
|
|
|
# combine
|
|
|
|
# max_doc_length (2mb see above) * 2 (delete + insert)
|
2020-03-24 11:21:29 -04:00
|
|
|
# max_ranges_size (3mb see MAX_RANGES_SIZE in document-updater)
|
|
|
|
# overhead for JSON serialization
|
|
|
|
maxUpdateSize: parseInt(process.env['MAX_UPDATE_SIZE']) or 7 * 1024 * 1024 + 64 * 1024
|
2020-03-24 04:12:12 -04:00
|
|
|
|
2019-08-13 06:12:04 -04:00
|
|
|
shutdownDrainTimeWindow: process.env['SHUTDOWN_DRAIN_TIME_WINDOW'] or 9
|
|
|
|
|
2019-02-15 10:23:59 -05:00
|
|
|
continualPubsubTraffic: process.env['CONTINUAL_PUBSUB_TRAFFIC'] or false
|
|
|
|
|
2019-07-15 08:45:34 -04:00
|
|
|
checkEventOrder: process.env['CHECK_EVENT_ORDER'] or false
|
|
|
|
|
2019-07-18 07:40:14 -04:00
|
|
|
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
|
|
|
|
|
2020-02-20 15:44:21 -05:00
|
|
|
statusCheckInterval: parseInt(process.env['STATUS_CHECK_INTERVAL'] or '0')
|
|
|
|
|
2019-03-05 12:33:52 -05:00
|
|
|
sentry:
|
|
|
|
dsn: process.env.SENTRY_DSN
|
2019-10-17 07:45:56 -04:00
|
|
|
|
|
|
|
errors:
|
|
|
|
catchUncaughtErrors: true
|
|
|
|
shutdownOnUncaughtError: true
|
2019-01-25 05:30:31 -05:00
|
|
|
|
|
|
|
# console.log settings.redis
|
2019-10-10 04:49:24 -04:00
|
|
|
module.exports = settings
|