2014-02-12 05:23:40 -05: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"
|
|
|
|
|
|
|
|
module.exports =
|
|
|
|
# File storage
|
|
|
|
# ------------
|
|
|
|
#
|
|
|
|
# ShareLaTeX stores binary files like images in S3.
|
|
|
|
# Fill in your Amazon S3 credential below.
|
|
|
|
s3:
|
|
|
|
key: ""
|
|
|
|
secret: ""
|
|
|
|
bucketName : ""
|
|
|
|
|
2014-03-05 06:22:52 -05:00
|
|
|
|
2014-02-12 05:23:40 -05:00
|
|
|
# Databases
|
|
|
|
# ---------
|
|
|
|
mongo:
|
2014-04-30 06:15:29 -04:00
|
|
|
url : 'mongodb://127.0.0.1/sharelatex'
|
2014-02-12 05:23:40 -05:00
|
|
|
|
|
|
|
redis:
|
|
|
|
web:
|
|
|
|
host: "localhost"
|
|
|
|
port: "6379"
|
|
|
|
password: ""
|
|
|
|
|
|
|
|
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 07:35:27 -04:00
|
|
|
trackchanges:
|
|
|
|
url : "http://localhost:3015"
|
2014-04-30 06:33:31 -04:00
|
|
|
docstore:
|
|
|
|
url : "http://localhost:3016"
|
2014-05-21 04:15:50 -04:00
|
|
|
pubUrl: "http://localhost:3016"
|
2014-02-12 05:23:40 -05:00
|
|
|
versioning:
|
|
|
|
snapshotwaitms:3000
|
|
|
|
url: "http://localhost:4000"
|
|
|
|
username: httpAuthUser
|
|
|
|
password: httpAuthPass
|
|
|
|
recurly:
|
|
|
|
privateKey: ""
|
|
|
|
apiKey: ""
|
|
|
|
subdomain: ""
|
|
|
|
chat:
|
|
|
|
url: "http://localhost:3010"
|
2014-07-17 06:43:12 -04:00
|
|
|
internal_url: "http://localhost:3010"
|
2014-02-12 05:23:40 -05:00
|
|
|
templates:
|
|
|
|
port: 3007
|
2014-07-01 09:25:32 -04:00
|
|
|
user_id: process.env.TEMPLATES_USER_ID or "5395eb7aad1f29a88756c7f2"
|
|
|
|
cdnDomain: "https://d340ybc4pnuh67.cloudfront.net"
|
|
|
|
indexName:"templates-development"
|
2014-02-12 05:23:40 -05:00
|
|
|
blog:
|
|
|
|
port: 3008
|
|
|
|
filestore:
|
|
|
|
url: "http://localhost:3009"
|
|
|
|
clsi:
|
|
|
|
url: "http://localhost:3013"
|
|
|
|
templates_api:
|
2014-03-03 11:19:52 -05:00
|
|
|
url: "http://localhost:3007"
|
2014-02-12 05:23:40 -05:00
|
|
|
|
|
|
|
# Where your instance of ShareLaTeX can be found publically. Used in emails
|
|
|
|
# that are sent out, generated links, etc.
|
2014-08-07 12:03:47 -04:00
|
|
|
siteUrl : siteUrl = 'http://localhost:3000'
|
2014-02-12 05:23:40 -05:00
|
|
|
|
2014-08-04 11:47:14 -04:00
|
|
|
# cooke domain
|
|
|
|
# use full domain for cookies to only be accesabble from that domain,
|
|
|
|
# replace subdomain with dot to have them accessable on all subdomains
|
|
|
|
# cookieDomain: ".sharelatex.dev"
|
|
|
|
|
2014-02-12 05:23:40 -05:00
|
|
|
# Same, but with http auth credentials.
|
|
|
|
httpAuthSiteUrl: 'http://#{httpAuthUser}:#{httpAuthPass}@localhost:3000'
|
|
|
|
|
|
|
|
# Security
|
|
|
|
# --------
|
|
|
|
security:
|
|
|
|
sessionSecret: sessionSecret
|
|
|
|
|
|
|
|
httpAuthUsers: httpAuthUsers
|
|
|
|
|
|
|
|
# Default features
|
|
|
|
# ----------------
|
|
|
|
#
|
|
|
|
# You can select the features that are enabled by default for new
|
|
|
|
# new users.
|
2014-02-22 05:50:59 -05:00
|
|
|
defaultFeatures: defaultFeatures =
|
|
|
|
collaborators: -1
|
|
|
|
dropbox: true
|
|
|
|
versioning: true
|
|
|
|
|
2014-02-12 05:23:40 -05:00
|
|
|
plans: plans = [{
|
|
|
|
planCode: "personal"
|
|
|
|
name: "Personal"
|
|
|
|
price: 0
|
2014-02-22 05:50:59 -05:00
|
|
|
features: defaultFeatures
|
2014-02-12 05:23:40 -05:00
|
|
|
}]
|
|
|
|
|
2014-08-05 06:15:17 -04:00
|
|
|
# i18n
|
|
|
|
# ------
|
|
|
|
#
|
|
|
|
i18n:
|
2014-08-07 12:03:47 -04:00
|
|
|
subdomainLang:
|
|
|
|
www: {lngCode:"en", url: siteUrl}
|
|
|
|
defaultLng: "en"
|
2014-08-05 06:15:17 -04:00
|
|
|
|
2014-02-12 05:23:40 -05:00
|
|
|
# Spelling languages
|
|
|
|
# ------------------
|
|
|
|
#
|
|
|
|
# You must have the corresponding aspell package installed to
|
|
|
|
# be able to use a language.
|
|
|
|
languages: [
|
2014-06-25 08:51:02 -04:00
|
|
|
{name: "English", code: "en"},
|
|
|
|
{name: "French", code: "fr"}
|
2014-02-12 05:23:40 -05:00
|
|
|
]
|
|
|
|
|
2014-03-12 07:43:36 -04: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 05:23:40 -05: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: ""
|
|
|
|
#
|
|
|
|
# ShareLaTeX's help desk is provided by tenderapp.com
|
|
|
|
# tenderUrl: ""
|
|
|
|
#
|
2014-03-05 06:22:52 -05:00
|
|
|
|
2014-02-12 05:23:40 -05: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 05:34:23 -04: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
|
|
|
|
|
2014-02-12 05:23:40 -05: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 11:32:17 -04:00
|
|
|
dumpFolder: Path.resolve __dirname + "/../data/dumpFolder"
|
|
|
|
uploadFolder: Path.resolve __dirname + "/../data/uploads"
|
2014-02-12 05:23:40 -05:00
|
|
|
|
|
|
|
# Automatic Snapshots
|
|
|
|
# -------------------
|
|
|
|
automaticSnapshots:
|
|
|
|
# How long should we wait after the user last edited to
|
|
|
|
# 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: ""
|
2014-06-20 16:35:42 -04:00
|
|
|
|
|
|
|
nav:
|
|
|
|
left_footer: [{
|
|
|
|
text: "Powered by <a href='https://www.sharelatex.com'>ShareLaTeX</a> © 2014"
|
|
|
|
}]
|
|
|
|
|
|
|
|
right_footer: [{
|
|
|
|
text: "<i class='fa fa-github-square'></i> Contribute on Github"
|
|
|
|
url: "https://github.com/sharelatex/sharelatex"
|
|
|
|
}]
|
|
|
|
|
|
|
|
header: [{
|
|
|
|
text: "Register"
|
|
|
|
url: "/register"
|
|
|
|
only_when_logged_out: true
|
|
|
|
}, {
|
|
|
|
text: "Log In"
|
|
|
|
url: "/login"
|
|
|
|
only_when_logged_out: true
|
|
|
|
}, {
|
|
|
|
text: "Projects"
|
|
|
|
url: "/project"
|
|
|
|
only_when_logged_in: true
|
|
|
|
}, {
|
|
|
|
text: "Account"
|
|
|
|
only_when_logged_in: true
|
|
|
|
dropdown: [{
|
|
|
|
text: "Account Settings"
|
|
|
|
url: "/user/settings"
|
|
|
|
}, {
|
|
|
|
divider: true
|
|
|
|
}, {
|
|
|
|
text: "Log out"
|
|
|
|
url: "/logout"
|
|
|
|
}]
|
|
|
|
}]
|
2014-07-01 09:25:32 -04:00
|
|
|
|
2014-08-18 13:26:47 -04:00
|
|
|
# templates: [{
|
|
|
|
# name : "cv_or_resume",
|
|
|
|
# url : "/templates/cv"
|
|
|
|
# }, {
|
2014-08-18 13:35:16 -04: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 13:26:47 -04:00
|
|
|
# }]
|
2014-08-18 12:59:34 -04:00
|
|
|
|
2014-07-01 09:25:32 -04:00
|
|
|
|
2014-07-01 10:44:12 -04:00
|
|
|
redirects:
|
|
|
|
"/templates/index": "/templates/"
|
2014-07-01 09:25:32 -04:00
|
|
|
|
2014-07-01 11:00:42 -04:00
|
|
|
proxyUrls: {}
|
|
|
|
|