2014-02-12 10:23:40 +00:00
|
|
|
Path = require('path')
|
|
|
|
http = require('http')
|
|
|
|
http.globalAgent.maxSockets = 300
|
|
|
|
|
|
|
|
# Make time interval config easier.
|
|
|
|
seconds = 1000
|
|
|
|
minutes = 60 * seconds
|
|
|
|
|
|
|
|
# These credentials are used for authenticating api requests
|
|
|
|
# between services that may need to go over public channels
|
|
|
|
httpAuthUser = "sharelatex"
|
|
|
|
httpAuthPass = "password"
|
|
|
|
httpAuthUsers = {}
|
|
|
|
httpAuthUsers[httpAuthUser] = httpAuthPass
|
|
|
|
|
|
|
|
sessionSecret = "secret-please-change"
|
|
|
|
|
2016-06-17 13:22:20 +00:00
|
|
|
module.exports = settings =
|
2014-02-12 10:23:40 +00:00
|
|
|
# File storage
|
|
|
|
# ------------
|
|
|
|
#
|
|
|
|
# ShareLaTeX stores binary files like images in S3.
|
|
|
|
# Fill in your Amazon S3 credential below.
|
|
|
|
s3:
|
|
|
|
key: ""
|
|
|
|
secret: ""
|
|
|
|
bucketName : ""
|
|
|
|
|
2014-03-05 11:22:52 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Databases
|
|
|
|
# ---------
|
|
|
|
mongo:
|
2014-04-30 10:15:29 +00:00
|
|
|
url : 'mongodb://127.0.0.1/sharelatex'
|
2014-02-12 10:23:40 +00:00
|
|
|
|
|
|
|
redis:
|
|
|
|
web:
|
|
|
|
host: "localhost"
|
|
|
|
port: "6379"
|
|
|
|
password: ""
|
|
|
|
|
2016-11-08 15:32:36 +00:00
|
|
|
# websessions:
|
|
|
|
# cluster: [
|
|
|
|
# {host: 'localhost', port: 7000}
|
|
|
|
# {host: 'localhost', port: 7001}
|
|
|
|
# {host: 'localhost', port: 7002}
|
|
|
|
# {host: 'localhost', port: 7003}
|
|
|
|
# {host: 'localhost', port: 7004}
|
|
|
|
# {host: 'localhost', port: 7005}
|
|
|
|
# ]
|
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
api:
|
|
|
|
host: "localhost"
|
|
|
|
port: "6379"
|
|
|
|
password: ""
|
|
|
|
|
|
|
|
# Service locations
|
|
|
|
# -----------------
|
|
|
|
|
|
|
|
# Configure which ports to run each service on. Generally you
|
|
|
|
# can leave these as they are unless you have some other services
|
|
|
|
# running which conflict, or want to run the web process on port 80.
|
|
|
|
internal:
|
|
|
|
web:
|
|
|
|
port: webPort = 3000
|
|
|
|
documentupdater:
|
|
|
|
port: docUpdaterPort = 3003
|
|
|
|
|
|
|
|
# Tell each service where to find the other services. If everything
|
|
|
|
# is running locally then this is easy, but they exist as separate config
|
|
|
|
# options incase you want to run some services on remote hosts.
|
|
|
|
apis:
|
|
|
|
web:
|
|
|
|
url: "http://localhost:#{webPort}"
|
|
|
|
user: httpAuthUser
|
|
|
|
pass: httpAuthPass
|
|
|
|
documentupdater:
|
|
|
|
url : "http://localhost:#{docUpdaterPort}"
|
|
|
|
thirdPartyDataStore:
|
|
|
|
url : "http://localhost:3002"
|
|
|
|
emptyProjectFlushDelayMiliseconds: 5 * seconds
|
|
|
|
tags:
|
|
|
|
url :"http://localhost:3012"
|
|
|
|
spelling:
|
|
|
|
url : "http://localhost:3005"
|
2014-05-06 11:35:27 +00:00
|
|
|
trackchanges:
|
|
|
|
url : "http://localhost:3015"
|
2014-04-30 10:33:31 +00:00
|
|
|
docstore:
|
|
|
|
url : "http://localhost:3016"
|
2014-05-21 08:15:50 +00:00
|
|
|
pubUrl: "http://localhost:3016"
|
2014-02-12 10:23:40 +00:00
|
|
|
chat:
|
|
|
|
url: "http://localhost:3010"
|
2014-07-17 10:43:12 +00:00
|
|
|
internal_url: "http://localhost:3010"
|
2014-02-12 10:23:40 +00:00
|
|
|
blog:
|
|
|
|
port: 3008
|
2014-10-08 15:07:44 +00:00
|
|
|
university:
|
|
|
|
url: "http://localhost:3011"
|
2014-02-12 10:23:40 +00:00
|
|
|
filestore:
|
|
|
|
url: "http://localhost:3009"
|
|
|
|
clsi:
|
|
|
|
url: "http://localhost:3013"
|
2014-08-20 13:47:27 +00:00
|
|
|
templates:
|
2014-03-03 16:19:52 +00:00
|
|
|
url: "http://localhost:3007"
|
2014-09-08 13:19:24 +00:00
|
|
|
githubSync:
|
|
|
|
url: "http://localhost:3022"
|
2014-08-20 13:47:27 +00:00
|
|
|
recurly:
|
|
|
|
privateKey: ""
|
|
|
|
apiKey: ""
|
|
|
|
subdomain: ""
|
2014-10-13 13:10:15 +00:00
|
|
|
geoIpLookup:
|
2014-11-21 13:13:53 +00:00
|
|
|
url: "http://localhost:8080/json"
|
2015-03-09 14:09:09 +00:00
|
|
|
realTime:
|
|
|
|
url: "http://localhost:3026"
|
2015-10-07 16:32:35 +00:00
|
|
|
contacts:
|
|
|
|
url: "http://localhost:3036"
|
2015-11-11 23:18:25 +00:00
|
|
|
sixpack:
|
|
|
|
url: ""
|
2016-06-24 14:03:15 +00:00
|
|
|
# references:
|
|
|
|
# url: "http://localhost:3040"
|
2016-08-05 14:15:56 +00:00
|
|
|
notifications:
|
2016-11-08 15:32:36 +00:00
|
|
|
url: "http://localhost:3042"
|
|
|
|
|
2014-08-20 13:47:27 +00:00
|
|
|
templates:
|
|
|
|
user_id: process.env.TEMPLATES_USER_ID or "5395eb7aad1f29a88756c7f2"
|
2015-04-13 10:29:59 +00:00
|
|
|
showSocialButtons: false
|
|
|
|
showComments: false
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2016-08-23 15:46:23 +00:00
|
|
|
# cdn:
|
|
|
|
# web:
|
|
|
|
# host:"http://nowhere.sharelatex.dev"
|
2016-07-21 18:06:53 +00:00
|
|
|
# darkHost:"http://cdn.sharelatex.dev:3000"
|
2016-07-18 13:05:07 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Where your instance of ShareLaTeX can be found publically. Used in emails
|
|
|
|
# that are sent out, generated links, etc.
|
2014-08-07 16:03:47 +00:00
|
|
|
siteUrl : siteUrl = 'http://localhost:3000'
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2014-09-01 22:15:38 +00:00
|
|
|
# cookie domain
|
2015-11-24 16:53:44 +00:00
|
|
|
# use full domain for cookies to only be accessible from that domain,
|
|
|
|
# replace subdomain with dot to have them accessible on all subdomains
|
2014-08-04 15:47:14 +00:00
|
|
|
# cookieDomain: ".sharelatex.dev"
|
2014-08-20 17:01:21 +00:00
|
|
|
cookieName:"sharelatex.sid"
|
2014-08-04 15:47:14 +00:00
|
|
|
|
2016-04-20 14:06:39 +00:00
|
|
|
# this is only used if cookies are used for clsi backend
|
|
|
|
#clsiCookieKey: "clsiserver"
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Same, but with http auth credentials.
|
|
|
|
httpAuthSiteUrl: 'http://#{httpAuthUser}:#{httpAuthPass}@localhost:3000'
|
|
|
|
|
2016-02-29 13:05:17 +00:00
|
|
|
|
2016-03-09 15:53:03 +00:00
|
|
|
maxEntitiesPerProject: 2000
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Security
|
|
|
|
# --------
|
|
|
|
security:
|
|
|
|
sessionSecret: sessionSecret
|
2016-06-17 12:50:32 +00:00
|
|
|
bcryptRounds: 12 # number of rounds used to hash user passwords (raised to power 2)
|
2014-02-12 10:23:40 +00:00
|
|
|
|
|
|
|
httpAuthUsers: httpAuthUsers
|
|
|
|
|
|
|
|
# Default features
|
|
|
|
# ----------------
|
|
|
|
#
|
|
|
|
# You can select the features that are enabled by default for new
|
|
|
|
# new users.
|
2014-02-22 10:50:59 +00:00
|
|
|
defaultFeatures: defaultFeatures =
|
|
|
|
collaborators: -1
|
|
|
|
dropbox: true
|
|
|
|
versioning: true
|
2016-09-06 10:41:14 +00:00
|
|
|
compileTimeout: 180
|
2014-10-13 14:42:11 +00:00
|
|
|
compileGroup: "standard"
|
2016-01-19 13:37:11 +00:00
|
|
|
references: true
|
|
|
|
templates: true
|
2014-02-22 10:50:59 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
plans: plans = [{
|
|
|
|
planCode: "personal"
|
|
|
|
name: "Personal"
|
|
|
|
price: 0
|
2014-02-22 10:50:59 +00:00
|
|
|
features: defaultFeatures
|
2014-02-12 10:23:40 +00:00
|
|
|
}]
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2016-10-12 16:35:40 +00:00
|
|
|
enableSubscriptions:false
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2014-08-05 10:15:17 +00:00
|
|
|
# i18n
|
|
|
|
# ------
|
2016-11-08 15:32:36 +00:00
|
|
|
#
|
2014-08-05 10:15:17 +00:00
|
|
|
i18n:
|
2014-08-07 16:03:47 +00:00
|
|
|
subdomainLang:
|
|
|
|
www: {lngCode:"en", url: siteUrl}
|
|
|
|
defaultLng: "en"
|
2014-08-05 10:15:17 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Spelling languages
|
|
|
|
# ------------------
|
|
|
|
#
|
2016-11-08 15:32:36 +00:00
|
|
|
# You must have the corresponding aspell package installed to
|
2014-02-12 10:23:40 +00:00
|
|
|
# be able to use a language.
|
|
|
|
languages: [
|
2014-06-25 12:51:02 +00:00
|
|
|
{name: "English", code: "en"},
|
|
|
|
{name: "French", code: "fr"}
|
2014-02-12 10:23:40 +00:00
|
|
|
]
|
|
|
|
|
2015-04-28 16:39:35 +00:00
|
|
|
|
|
|
|
# Password Settings
|
|
|
|
# -----------
|
|
|
|
# These restrict the passwords users can use when registering
|
|
|
|
# opts are from http://antelle.github.io/passfield
|
2016-10-03 10:33:14 +00:00
|
|
|
# passwordStrengthOptions:
|
|
|
|
# pattern: "aA$3"
|
|
|
|
# length:
|
|
|
|
# min: 1
|
|
|
|
# max: 10
|
2015-04-28 16:39:35 +00:00
|
|
|
|
2014-03-12 11:43:36 +00:00
|
|
|
# Email support
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
|
|
|
|
# To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
|
|
|
|
#email:
|
|
|
|
# fromAddress: ""
|
|
|
|
# replyTo: ""
|
|
|
|
# lifecycle: false
|
|
|
|
## Example transport and parameter settings for Amazon SES
|
|
|
|
# transport: "SES"
|
|
|
|
# parameters:
|
|
|
|
# AWSAccessKeyID: ""
|
|
|
|
# AWSSecretKey: ""
|
|
|
|
|
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Third party services
|
|
|
|
# --------------------
|
|
|
|
#
|
|
|
|
# ShareLaTeX's regular newsletter is managed by Markdown mail. Add your
|
|
|
|
# credentials here to integrate with this.
|
|
|
|
# markdownmail:
|
|
|
|
# secret: ""
|
|
|
|
# list_id: ""
|
|
|
|
#
|
|
|
|
# Fill in your unique token from various analytics services to enable
|
|
|
|
# them.
|
|
|
|
# analytics:
|
|
|
|
# ga:
|
|
|
|
# token: ""
|
2016-11-08 15:32:36 +00:00
|
|
|
#
|
2014-02-12 10:23:40 +00:00
|
|
|
# ShareLaTeX's help desk is provided by tenderapp.com
|
|
|
|
# tenderUrl: ""
|
|
|
|
#
|
2014-12-12 13:58:07 +00:00
|
|
|
# Client-side error logging is provided by getsentry.com
|
|
|
|
# sentry:
|
|
|
|
# src: ""
|
|
|
|
# publicDSN: ""
|
|
|
|
#
|
|
|
|
# src should be either a remote url like
|
2015-09-30 09:40:20 +00:00
|
|
|
# //cdn.ravenjs.com/1.1.22/jquery,native/raven.min.js
|
2014-12-12 13:58:07 +00:00
|
|
|
# or a local file in the js/libs directory.
|
|
|
|
# The publicDSN is the token for the client-side getSentry service.
|
2014-02-12 10:23:40 +00:00
|
|
|
|
|
|
|
# Production Settings
|
|
|
|
# -------------------
|
|
|
|
|
|
|
|
# Should javascript assets be served minified or not. Note that you will
|
|
|
|
# need to run `grunt compile:minify` within the web-sharelatex directory
|
|
|
|
# to generate these.
|
|
|
|
useMinifiedJs: false
|
|
|
|
|
|
|
|
# Should static assets be sent with a header to tell the browser to cache
|
|
|
|
# them.
|
|
|
|
cacheStaticAssets: false
|
|
|
|
|
|
|
|
# If you are running ShareLaTeX over https, set this to true to send the
|
|
|
|
# cookie with a secure flag (recommended).
|
|
|
|
secureCookie: false
|
|
|
|
|
2014-06-25 09:34:23 +00:00
|
|
|
# If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
|
|
|
|
# then set this to true to allow it to correctly detect the forwarded IP
|
|
|
|
# address and http/https protocol information.
|
|
|
|
behindProxy: false
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-04-14 12:04:29 +00:00
|
|
|
# Cookie max age (in milliseconds). Set to false for a browser session.
|
|
|
|
cookieSessionLength: 5 * 24 * 60 * 60 * 1000 # 5 days
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2016-12-20 09:54:42 +00:00
|
|
|
# When true, only allow invites to be sent to email addresses that
|
|
|
|
# already have user accounts
|
|
|
|
restrictInvitesToExistingAccounts: false
|
|
|
|
|
2015-04-15 10:14:38 +00:00
|
|
|
# Should we allow access to any page without logging in? This includes
|
|
|
|
# public projects, /learn, /templates, about pages, etc.
|
2016-03-15 14:14:33 +00:00
|
|
|
allowPublicAccess: if process.env["SHARELATEX_ALLOW_PUBLIC_ACCESS"] == 'true' then true else false
|
2016-06-30 08:43:09 +00:00
|
|
|
|
|
|
|
# Use a single compile directory for all users in a project
|
|
|
|
# (otherwise each user has their own directory)
|
2016-06-30 14:15:37 +00:00
|
|
|
# disablePerUserCompiles: true
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-11-06 12:51:43 +00:00
|
|
|
# Maximum size of text documents in the real-time editing system.
|
|
|
|
max_doc_length: 2 * 1024 * 1024 # 2mb
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Internal configs
|
|
|
|
# ----------------
|
|
|
|
path:
|
|
|
|
# If we ever need to write something to disk (e.g. incoming requests
|
|
|
|
# that need processing but may be too big for memory, then write
|
|
|
|
# them to disk here).
|
2014-05-15 15:32:17 +00:00
|
|
|
dumpFolder: Path.resolve __dirname + "/../data/dumpFolder"
|
|
|
|
uploadFolder: Path.resolve __dirname + "/../data/uploads"
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-02-12 10:23:40 +00:00
|
|
|
# Automatic Snapshots
|
|
|
|
# -------------------
|
|
|
|
automaticSnapshots:
|
2016-11-08 15:32:36 +00:00
|
|
|
# How long should we wait after the user last edited to
|
2014-02-12 10:23:40 +00:00
|
|
|
# take a snapshot?
|
|
|
|
waitTimeAfterLastEdit: 5 * minutes
|
|
|
|
# Even if edits are still taking place, this is maximum
|
|
|
|
# time to wait before taking another snapshot.
|
|
|
|
maxTimeBetweenSnapshots: 30 * minutes
|
|
|
|
|
|
|
|
# Smoke test
|
|
|
|
# ----------
|
|
|
|
# Provide log in credentials and a project to be able to run
|
|
|
|
# some basic smoke tests to check the core functionality.
|
|
|
|
#
|
|
|
|
# smokeTest:
|
|
|
|
# user: ""
|
|
|
|
# password: ""
|
|
|
|
# projectId: ""
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-03-09 12:14:30 +00:00
|
|
|
appName: "ShareLaTeX (Community Edition)"
|
2015-03-18 16:20:26 +00:00
|
|
|
adminEmail: "placeholder@example.com"
|
2014-06-20 20:35:42 +00:00
|
|
|
|
|
|
|
nav:
|
2015-02-05 16:56:35 +00:00
|
|
|
title: "ShareLaTeX Community Edition"
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-06-20 20:35:42 +00:00
|
|
|
left_footer: [{
|
2016-01-04 11:12:10 +00:00
|
|
|
text: "Powered by <a href='https://www.sharelatex.com'>ShareLaTeX</a> © 2016"
|
2014-06-20 20:35:42 +00:00
|
|
|
}]
|
|
|
|
|
|
|
|
right_footer: [{
|
2015-02-05 16:56:35 +00:00
|
|
|
text: "<i class='fa fa-github-square'></i> Fork on Github!"
|
2014-06-20 20:35:42 +00:00
|
|
|
url: "https://github.com/sharelatex/sharelatex"
|
|
|
|
}]
|
|
|
|
|
2017-01-11 10:27:38 +00:00
|
|
|
showSubscriptionLink: false
|
|
|
|
|
|
|
|
header_extras: []
|
|
|
|
# Example:
|
|
|
|
# header_extras: [{text: "Some Page", url: "http://example.com/some/page", class: "subdued"}]
|
2016-07-14 10:40:32 +00:00
|
|
|
|
|
|
|
customisation: {}
|
|
|
|
|
2014-08-18 17:26:47 +00:00
|
|
|
# templates: [{
|
|
|
|
# name : "cv_or_resume",
|
|
|
|
# url : "/templates/cv"
|
|
|
|
# }, {
|
2014-08-18 17:35:16 +00:00
|
|
|
# name : "cover_letter",
|
|
|
|
# url : "/templates/cover-letters"
|
|
|
|
# }, {
|
|
|
|
# name : "journal_article",
|
|
|
|
# url : "/templates/journals"
|
|
|
|
# }, {
|
|
|
|
# name : "presentation",
|
|
|
|
# url : "/templates/presentations"
|
|
|
|
# }, {
|
|
|
|
# name : "thesis",
|
|
|
|
# url : "/templates/thesis"
|
|
|
|
# }, {
|
|
|
|
# name : "bibliographies",
|
|
|
|
# url : "/templates/bibliographies"
|
|
|
|
# }, {
|
|
|
|
# name : "view_all",
|
|
|
|
# url : "/templates"
|
2014-08-18 17:26:47 +00:00
|
|
|
# }]
|
2014-08-18 16:59:34 +00:00
|
|
|
|
2014-07-01 13:25:32 +00:00
|
|
|
|
2014-07-01 14:44:12 +00:00
|
|
|
redirects:
|
|
|
|
"/templates/index": "/templates/"
|
2014-07-01 13:25:32 +00:00
|
|
|
|
2014-07-01 15:00:42 +00:00
|
|
|
proxyUrls: {}
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2014-10-08 14:57:56 +00:00
|
|
|
reloadModuleViewsOnEachRequest: true
|
2015-02-20 12:09:35 +00:00
|
|
|
|
2015-05-22 12:57:15 +00:00
|
|
|
domainLicences: [
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-05-22 12:57:15 +00:00
|
|
|
]
|
|
|
|
|
2015-10-27 11:37:11 +00:00
|
|
|
sixpack:
|
2015-11-02 16:28:30 +00:00
|
|
|
domain:""
|
2015-02-20 12:09:35 +00:00
|
|
|
# ShareLaTeX Server Pro options (https://www.sharelatex.com/university/onsite.html)
|
|
|
|
# ----------
|
|
|
|
|
|
|
|
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-11-17 16:27:29 +00:00
|
|
|
# LDAP
|
|
|
|
# ----------
|
|
|
|
# Settings below use a working LDAP test server kindly provided by forumsys.com
|
|
|
|
# When testing with forumsys.com use username = einstein and password = password
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-10-22 09:42:50 +00:00
|
|
|
# ldap :
|
2015-02-26 11:40:02 +00:00
|
|
|
# host: 'ldap://ldap.forumsys.com'
|
2015-10-22 09:42:50 +00:00
|
|
|
# dn: 'uid=:userKey,dc=example,dc=com'
|
|
|
|
# baseSearch: 'dc=example,dc=com'
|
|
|
|
# filter: "(uid=:userKey)"
|
2015-02-26 11:40:02 +00:00
|
|
|
# failMessage: 'LDAP User Fail'
|
|
|
|
# fieldName: 'LDAP User'
|
2016-04-28 16:21:07 +00:00
|
|
|
# placeholder: 'email@example.com'
|
2015-02-26 11:40:02 +00:00
|
|
|
# emailAtt: 'mail'
|
2015-10-22 09:42:50 +00:00
|
|
|
# anonymous: false
|
2016-11-08 15:32:36 +00:00
|
|
|
# adminDN: 'cn=read-only-admin,dc=example,dc=com'
|
2015-11-19 11:52:11 +00:00
|
|
|
# adminPW: 'password'
|
2016-04-06 14:32:08 +00:00
|
|
|
# starttls: true
|
|
|
|
# tlsOptions:
|
|
|
|
# rejectUnauthorized: false
|
2016-04-15 17:46:11 +00:00
|
|
|
# ca: ['/etc/ldap/ca_certs.pem']
|
2016-11-08 15:32:36 +00:00
|
|
|
|
2015-05-10 12:10:03 +00:00
|
|
|
#templateLinks: [{
|
|
|
|
# name : "CV projects",
|
|
|
|
# url : "/templates/cv"
|
|
|
|
#},{
|
|
|
|
# name : "all projects",
|
|
|
|
# url: "/templates/all"
|
|
|
|
#}]
|