settings.development.coffee.example 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. Path = require('path')
  2. # These credentials are used for authenticating api requests
  3. # between services that may need to go over public channels
  4. httpAuthUser = "sharelatex"
  5. httpAuthPass = "CRYPTO_RANDOM" # Randomly generated for you
  6. httpAuthUsers = {}
  7. httpAuthUsers[httpAuthUser] = httpAuthPass
  8. DATA_DIR = Path.resolve(Path.join(__dirname, "..", "data"))
  9. TMP_DIR = Path.resolve(Path.join(__dirname, "..", "tmp"))
  10. module.exports =
  11. # Databases
  12. # ---------
  13. # ShareLaTeX's main persistant data store is MongoDB (http://www.mongodb.org/)
  14. # Documentation about the URL connection string format can be found at:
  15. #
  16. # http://docs.mongodb.org/manual/reference/connection-string/
  17. #
  18. # The following works out of the box with Mongo's default settings:
  19. mongo:
  20. url : 'mongodb://127.0.0.1/sharelatex'
  21. # Redis is used in ShareLaTeX for high volume queries, like real-time
  22. # editing, and session management.
  23. #
  24. # The following config will work with Redis's default settings:
  25. redis:
  26. web:
  27. host: "localhost"
  28. port: "6379"
  29. password: ""
  30. # The compile server (the clsi) uses a SQL database to cache files and
  31. # meta-data. sqllite is the default, and the load is low enough that this will
  32. # be fine in production (we use sqllite at sharelatex.com).
  33. #
  34. # If you want to configure a different database, see the Sequelize documentation
  35. # for available options:
  36. #
  37. # https://github.com/sequelize/sequelize/wiki/API-Reference-Sequelize#example-usage
  38. #
  39. mysql:
  40. clsi:
  41. database: "clsi"
  42. username: "clsi"
  43. password: ""
  44. dialect: "sqlite"
  45. storage: Path.join(DATA_DIR, "db.sqlite")
  46. # File storage
  47. # ------------
  48. # ShareLaTeX can store binary files like images either locally or in Amazon
  49. # S3. The default is locally:
  50. filestore:
  51. backend: "fs"
  52. stores:
  53. user_files: Path.join(DATA_DIR, "user_files")
  54. # To use Amazon S3 as a storage backend, comment out the above config, and
  55. # uncomment the following, filling in your key, secret, and bucket name:
  56. #
  57. # filestore:
  58. # backend: "s3"
  59. # stores:
  60. # user_files: "BUCKET_NAME"
  61. # s3:
  62. # key: "AWS_KEY"
  63. # secret: "AWS_SECRET"
  64. #
  65. # Local disk caching
  66. # ------------------
  67. path:
  68. # If we ever need to write something to disk (e.g. incoming requests
  69. # that need processing but may be too big for memory), then write
  70. # them to disk here:
  71. dumpFolder: Path.join(TMP_DIR, "dumpFolder")
  72. # Where to write uploads before they are processed
  73. uploadFolder: Path.join(TMP_DIR, "uploads")
  74. # Where to write the project to disk before running LaTeX on it
  75. compilesDir: Path.join(DATA_DIR, "compiles")
  76. # Where to cache downloaded URLs for the CLSI
  77. clsiCacheDir: Path.join(DATA_DIR, "cache")
  78. # Server Config
  79. # -------------
  80. # Where your instance of ShareLaTeX can be found publicly. This is used
  81. # when emails are sent out and in generated links:
  82. siteUrl : 'http://localhost:3000'
  83. # The websocket layer of ShareLaTeX runs as separate service.
  84. # When running locally or in development, you can point the client to this
  85. # service directly on port 3026. If you are running behind a reverse proxy (Nginx, etc)
  86. # then websocketsUrl should be the same as siteUrl, with your reverse
  87. # proxy responible for sending websocket traffic to the websocket service
  88. # rather than connecting directly.
  89. websocketsUrl: 'http://localhost:3026'
  90. # If provided, a sessionSecret is used to sign cookies so that they cannot be
  91. # spoofed. This is recommended.
  92. security:
  93. sessionSecret: "CRYPTO_RANDOM" # This was randomly generated for you
  94. # These credentials are used for authenticating api requests
  95. # between services that may need to go over public channels
  96. httpAuthUsers: httpAuthUsers
  97. # Should javascript assets be served minified or not. Note that you will
  98. # need to run `grunt compile:minify` within the web-sharelatex directory
  99. # to generate these.
  100. useMinifiedJs: false
  101. # Should static assets be sent with a header to tell the browser to cache
  102. # them. This should be false in development where changes are being made,
  103. # but should be set to true in production.
  104. cacheStaticAssets: false
  105. # If you are running ShareLaTeX over https, set this to true to send the
  106. # cookie with a secure flag (recommended).
  107. secureCookie: false
  108. # If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
  109. # then set this to true to allow it to correctly detect the forwarded IP
  110. # address and http/https protocol information.
  111. behindProxy: false
  112. # Sending Email
  113. # -------------
  114. #
  115. # You must configure a mail server to be able to send invite emails from
  116. # ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer
  117. # documentation for available options:
  118. #
  119. # http://www.nodemailer.com/docs/transports
  120. #
  121. # email:
  122. # fromAddress: ""
  123. # replyTo: ""
  124. # transport: "SES"
  125. # parameters:
  126. # AWSAccessKeyID: ""
  127. # AWSSecretKey: ""
  128. # Spell Check Languages
  129. # ---------------------
  130. #
  131. # You must have the corresponding aspell dictionary installed to
  132. # be able to use a language. Run `grunt check:aspell` to check which
  133. # dictionaries you have installed. These should be set for the `code` for
  134. # each language.
  135. languages: [
  136. {name: "English", code: "en"}
  137. ]
  138. # Service locations
  139. # -----------------
  140. # ShareLaTeX is comprised of many small services, which each expose
  141. # an HTTP API running on a different port. Generally you
  142. # can leave these as they are unless you have some other services
  143. # running which conflict, or want to run the web process on port 80.
  144. # internal:
  145. # web:
  146. # port: webPort = 3000
  147. # host: "localhost"
  148. # documentupdater:
  149. # port: docUpdaterPort = 3003
  150. # host: "localhost"
  151. # filestore:
  152. # port: filestorePort = 3009
  153. # host: "localhost"
  154. # chat:
  155. # port: chatPort = 3010
  156. # host: "localhost"
  157. # tags:
  158. # port: tagsPort = 3012
  159. # host: "localhost"
  160. # clsi:
  161. # port: clsiPort = 3013
  162. # host: "localhost"
  163. # trackchanges:
  164. # port: trackchangesPort = 3015
  165. # host: "localhost"
  166. # docstore:
  167. # port: docstorePort = 3016
  168. # host: "localhost"
  169. # spelling:
  170. # port: spellingPort = 3005
  171. # host: "localhost"
  172. # If you change the above config, or run some services on remote servers,
  173. # you need to tell the other services where to find them:
  174. apis:
  175. web:
  176. url: "http://localhost:3000"
  177. user: httpAuthUser
  178. pass: httpAuthPass
  179. # documentupdater:
  180. # url : "http://localhost:#{docUpdaterPort}"
  181. # clsi:
  182. # url: "http://localhost:#{clsiPort}"
  183. # filestore:
  184. # url: "http://localhost:#{filestorePort}"
  185. # trackchanges:
  186. # url: "http://localhost:#{trackchangesPort}"
  187. # docstore:
  188. # url: "http://localhost:#{docstorePort}"
  189. # tags:
  190. # url: "http://localhost:#{tagsPort}"
  191. # spelling:
  192. # url: "http://localhost:#{spellingPort}"
  193. # chat:
  194. # url: "http://localhost:#{chatPort}"
  195. # With lots of incoming and outgoing HTTP connections to different services,
  196. # sometimes long running, it is a good idea to increase the default number
  197. # of sockets that Node will hold open.
  198. http = require('http')
  199. http.globalAgent.maxSockets = 300
  200. https = require('https')
  201. https.globalAgent.maxSockets = 300