overleaf/server-ce/config/settings.development.coffee.example

231 lines
7 KiB
Text
Raw Normal View History

2014-02-10 12:26:34 +00:00
Path = require('path')
# These credentials are used for authenticating api requests
# between services that may need to go over public channels
httpAuthUser = "sharelatex"
2014-08-15 14:05:07 +00:00
httpAuthPass = "CRYPTO_RANDOM" # Randomly generated for you
2014-02-10 12:26:34 +00:00
httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass
2014-08-15 14:05:07 +00:00
DATA_DIR = Path.resolve(Path.join(__dirname, "..", "data"))
TMP_DIR = Path.resolve(Path.join(__dirname, "..", "tmp"))
2014-02-10 12:26:34 +00:00
module.exports =
# Databases
# ---------
2014-08-15 14:05:07 +00:00
# ShareLaTeX's main persistant data store is MongoDB (http://www.mongodb.org/)
# Documentation about the URL connection string format can be found at:
#
# http://docs.mongodb.org/manual/reference/connection-string/
#
# The following works out of the box with Mongo's default settings:
2014-02-10 12:26:34 +00:00
mongo:
url : 'mongodb://127.0.0.1/sharelatex'
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Redis is used in ShareLaTeX for high volume queries, like real-time
# editing, and session management.
#
# The following config will work with Redis's default settings:
2014-02-10 12:26:34 +00:00
redis:
web:
host: "localhost"
port: "6379"
password: ""
2014-08-15 14:05:07 +00:00
# The compile server (the clsi) uses a SQL database to cache files and
# meta-data. sqllite is the default, and the load is low enough that this will
# be fine in production (we use sqllite at sharelatex.com).
#
# If you want to configure a different database, see the Sequelize documentation
# for available options:
#
# https://github.com/sequelize/sequelize/wiki/API-Reference-Sequelize#example-usage
#
2014-02-13 12:37:47 +00:00
mysql:
clsi:
database: "clsi"
username: "clsi"
password: ""
2014-02-18 17:40:23 +00:00
dialect: "sqlite"
2014-08-15 14:05:07 +00:00
storage: Path.join(DATA_DIR, "db.sqlite")
2014-02-13 12:37:47 +00:00
2014-08-15 14:05:07 +00:00
# File storage
# ------------
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# ShareLaTeX can store binary files like images either locally or in Amazon
# S3. The default is locally:
filestore:
backend: "fs"
stores:
user_files: Path.join(DATA_DIR, "user_files")
# To use Amazon S3 as a storage backend, comment out the above config, and
# uncomment the following, filling in your key, secret, and bucket name:
#
#filestore:
# backend: "s3"
# stores:
# user_files: "BUCKET_NAME"
# s3:
# key: "AWS_KEY"
# secret: "AWS_SECRET"
2014-08-15 14:05:07 +00:00
#
# Local disk caching
# ------------------
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:
dumpFolder: Path.join(TMP_DIR, "dumpFolder")
# Where to write uploads before they are processed
uploadFolder: Path.join(TMP_DIR, "uploads")
# Where to write the project to disk before running LaTeX on it
compilesDir: Path.join(DATA_DIR, "compiles")
# Where to cache downloaded URLs for the CLSI
clsiCacheDir: Path.join(DATA_DIR, "cache")
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Server Config
# -------------
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Where your instance of ShareLaTeX can be found publicly. This is used
# when emails are sent out and in generated links:
2014-02-10 12:26:34 +00:00
siteUrl : 'http://localhost:3000'
2014-08-15 14:05:07 +00:00
# The websocket layer of ShareLaTeX runs as separate service.
# When running locally or in development, you can point the client to this
# service directly on port 3026. If you are running behind a reverse proxy (Nginx, etc)
# then websocketsUrl should be the same as siteUrl, with your reverse
# proxy responible for sending websocket traffic to the websocket service
# rather than connecting directly.
websocketsUrl: 'http://localhost:3026'
2014-08-15 14:05:07 +00:00
# If provided, a sessionSecret is used to sign cookies so that they cannot be
# spoofed. This is recommended.
2014-02-10 12:26:34 +00:00
security:
2014-08-15 14:05:07 +00:00
sessionSecret: "CRYPTO_RANDOM" # This was randomly generated for you
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# These credentials are used for authenticating api requests
# between services that may need to go over public channels
2014-02-10 12:26:34 +00:00
httpAuthUsers: httpAuthUsers
2014-08-15 14:05:07 +00:00
# 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
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Should static assets be sent with a header to tell the browser to cache
# them. This should be false in development where changes are being made,
# but should be set to true in production.
cacheStaticAssets: false
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# If you are running ShareLaTeX over https, set this to true to send the
# cookie with a secure flag (recommended).
secureCookie: false
# 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-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Sending Email
2014-03-07 13:08:46 +00:00
# -------------
#
2014-08-15 14:05:07 +00:00
# You must configure a mail server to be able to send invite emails from
# ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer
# documentation for available options:
#
# http://www.nodemailer.com/docs/transports
#
2014-04-30 10:34:32 +00:00
# email:
2014-03-07 13:08:46 +00:00
# fromAddress: ""
# replyTo: ""
# transport: "SES"
# parameters:
# AWSAccessKeyID: ""
# AWSSecretKey: ""
2014-08-15 14:05:07 +00:00
# Spell Check Languages
# ---------------------
2014-02-10 12:26:34 +00:00
#
2014-08-15 14:05:07 +00:00
# You must have the corresponding aspell dictionary installed to
# be able to use a language. Run `grunt check:aspell` to check which
# dictionaries you have installed. These should be set for the `code` for
# each language.
languages: [
{name: "English", code: "en"}
]
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# Service locations
# -----------------
2014-02-10 12:26:34 +00:00
2014-08-15 14:05:07 +00:00
# ShareLaTeX is comprised of many small services, which each expose
# an HTTP API running on a different port. 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
# host: "localhost"
# documentupdater:
# port: docUpdaterPort = 3003
# host: "localhost"
# filestore:
# port: filestorePort = 3009
# host: "localhost"
# chat:
# port: chatPort = 3010
# host: "localhost"
# tags:
# port: tagsPort = 3012
# host: "localhost"
# clsi:
# port: clsiPort = 3013
# host: "localhost"
# trackchanges:
# port: trackchangesPort = 3015
# host: "localhost"
# docstore:
# port: docstorePort = 3016
# host: "localhost"
# spelling:
2014-08-15 14:05:07 +00:00
# port: spellingPort = 3005
# host: "localhost"
# realTime:
# port: realTimeport = 3026
# host: "localhost"
2014-08-15 14:05:07 +00:00
# If you change the above config, or run some services on remote servers,
# you need to tell the other services where to find them:
apis:
web:
url: "http://localhost:3000"
user: httpAuthUser
pass: httpAuthPass
# documentupdater:
# url : "http://localhost:#{docUpdaterPort}"
# clsi:
# url: "http://localhost:#{clsiPort}"
# filestore:
# url: "http://localhost:#{filestorePort}"
# trackchanges:
# url: "http://localhost:#{trackchangesPort}"
# docstore:
# url: "http://localhost:#{docstorePort}"
# tags:
# url: "http://localhost:#{tagsPort}"
# spelling:
# url: "http://localhost:#{spellingPort}"
# chat:
# url: "http://localhost:#{chatPort}"
2014-08-15 14:05:07 +00:00
2014-02-14 17:30:43 +00:00
2014-08-15 14:05:07 +00:00
# With lots of incoming and outgoing HTTP connections to different services,
# sometimes long running, it is a good idea to increase the default number
# of sockets that Node will hold open.
http = require('http')
http.globalAgent.maxSockets = 300
https = require('https')
https.globalAgent.maxSockets = 300