overleaf/services/real-time/config/settings.defaults.coffee

80 lines
3.4 KiB
CoffeeScript
Raw Normal View History

2019-01-22 15:50:34 +00:00
settings =
redis:
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 ""
maxRetriesPerRequest: parseInt(process.env["PUBSUB_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
realtime:
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 ""
key_schema:
2019-02-04 09:47:11 +00:00
clientsInProject: ({project_id}) -> "clients_in_project:{#{project_id}}"
connectedUser: ({project_id, client_id})-> "connected_user:{#{project_id}}:#{client_id}"
maxRetriesPerRequest: parseInt(process.env["REAL_TIME_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
documentupdater:
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 ""
key_schema:
2019-02-04 09:47:11 +00:00
pendingUpdates: ({doc_id}) -> "PendingUpdates:{#{doc_id}}"
maxRetriesPerRequest: parseInt(process.env["DOC_UPDATER_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
2017-05-10 14:52:35 +00:00
2019-01-22 16:44:39 +00: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 ""
maxRetriesPerRequest: parseInt(process.env["WEB_REDIS_MAX_RETRIES_PER_REQUEST"] or process.env["REDIS_MAX_RETRIES_PER_REQUEST"] or "20")
2017-05-10 14:52:35 +00:00
internal:
realTime:
port: 3026
host: process.env['LISTEN_ADDRESS'] or "localhost"
user: "sharelatex"
pass: "password"
2014-11-10 11:27:08 +00:00
apis:
web:
2019-02-01 19:27:56 +00: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 17:25:45 +00:00
user: process.env['WEB_API_USER'] or "sharelatex"
pass: process.env['WEB_API_PASSWORD'] or "password"
2014-11-12 15:54:55 +00:00
documentupdater:
2018-10-19 18:42:33 +00:00
url: "http://#{process.env['DOCUMENT_UPDATER_HOST'] or process.env['DOCUPDATER_HOST'] or "localhost"}:3003"
2014-11-10 11:27:08 +00:00
security:
2018-12-03 14:05:03 +00:00
sessionSecret: process.env['SESSION_SECRET'] or "secret-please-change"
2018-12-03 14:05:03 +00:00
cookieName: process.env['COOKIE_NAME'] or "sharelatex.sid"
2015-12-01 11:05:49 +00:00
2018-12-04 14:06:39 +00:00
max_doc_length: 2 * 1024 * 1024 # 2mb
# combine
# max_doc_length (2mb see above) * 2 (delete + insert)
# 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
shutdownDrainTimeWindow: process.env['SHUTDOWN_DRAIN_TIME_WINDOW'] or 9
continualPubsubTraffic: process.env['CONTINUAL_PUBSUB_TRAFFIC'] or false
checkEventOrder: process.env['CHECK_EVENT_ORDER'] or false
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
statusCheckInterval: parseInt(process.env['STATUS_CHECK_INTERVAL'] or '0')
2019-03-05 17:33:52 +00:00
sentry:
dsn: process.env.SENTRY_DSN
errors:
catchUncaughtErrors: true
shutdownOnUncaughtError: true
2019-01-25 10:30:31 +00:00
# console.log settings.redis
module.exports = settings