settings.development.coffee.example 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. Path = require('path')
  2. http = require('http')
  3. http.globalAgent.maxSockets = 300
  4. # Make time interval config easier.
  5. seconds = 1000
  6. minutes = 60 * seconds
  7. # These credentials are used for authenticating api requests
  8. # between services that may need to go over public channels
  9. httpAuthUser = "sharelatex"
  10. httpAuthPass = "password"
  11. httpAuthUsers = {}
  12. httpAuthUsers[httpAuthUser] = httpAuthPass
  13. sessionSecret = "secret-please-change"
  14. module.exports =
  15. # File storage
  16. # ------------
  17. #
  18. # ShareLaTeX needs somewhere to store binary files like images.
  19. # There are currently two options:
  20. # Your local filesystem (the default)
  21. # Amazon S3
  22. filestore:
  23. # which backend persistor to use.
  24. # choices are
  25. # s3 - Amazon S3
  26. # fs - local filesystem
  27. backend: "fs"
  28. stores:
  29. # where to store user and template binary files
  30. #
  31. # For Amazon S3 this is the bucket name to store binary files
  32. #
  33. # For local filesystem this is the directory to store the files in.
  34. # This path must exist, not be tmpfs and be writable to by the user sharelatex is run as.
  35. user_files: Path.resolve(__dirname + "/../user_files")
  36. # Uncomment if you need to configure your S3 credentials
  37. # s3:
  38. # # if you are using S3, then fill in your S3 details below
  39. # key: ""
  40. # secret: ""
  41. # Databases
  42. # ---------
  43. mongo:
  44. url : 'mongodb://127.0.0.1/sharelatex'
  45. redis:
  46. web:
  47. host: "localhost"
  48. port: "6379"
  49. password: ""
  50. api:
  51. host: "localhost"
  52. port: "6379"
  53. password: ""
  54. fairy:
  55. host: "localhost"
  56. port: "6379"
  57. password: ""
  58. mysql:
  59. clsi:
  60. database: "clsi"
  61. username: "clsi"
  62. password: ""
  63. dialect: "sqlite"
  64. storage: Path.resolve(__dirname + "/../db.sqlite")
  65. # Service locations
  66. # -----------------
  67. # Configure which ports to run each service on. Generally you
  68. # can leave these as they are unless you have some other services
  69. # running which conflict, or want to run the web process on port 80.
  70. internal:
  71. web:
  72. port: webPort = 3000
  73. host: "localhost"
  74. documentupdater:
  75. port: docUpdaterPort = 3003
  76. host: "localhost"
  77. clsi:
  78. port: clsiPort = 3013
  79. host: "localhost"
  80. filestore:
  81. port: filestorePort = 3009
  82. host: "localhost"
  83. trackchanges:
  84. port: trackchangesPort = 3015
  85. host: "localhost"
  86. # Tell each service where to find the other services. If everything
  87. # is running locally then this is easy, but they exist as separate config
  88. # options incase you want to run some services on remote hosts.
  89. apis:
  90. web:
  91. url: "http://localhost:#{webPort}"
  92. user: httpAuthUser
  93. pass: httpAuthPass
  94. documentupdater:
  95. url : "http://localhost:#{docUpdaterPort}"
  96. clsi:
  97. url: "http://localhost:#{clsiPort}"
  98. filestore:
  99. url: "http://localhost:#{filestorePort}"
  100. trackchanges:
  101. url: "http://localhost:#{trackchangesPort}"
  102. thirdPartyDataStore:
  103. url : "http://localhost:3002"
  104. emptyProjectFlushDelayMiliseconds: 5 * seconds
  105. tags:
  106. url :"http://localhost:3012"
  107. spelling:
  108. url : "http://localhost:3005"
  109. versioning:
  110. snapshotwaitms:3000
  111. url: "http://localhost:4000"
  112. username: httpAuthUser
  113. password: httpAuthPass
  114. recurly:
  115. privateKey: ""
  116. apiKey: ""
  117. subdomain: ""
  118. chat:
  119. url: "http://localhost:3010"
  120. templates:
  121. port: 3007
  122. blog:
  123. port: 3008
  124. templates_api:
  125. url: "http://localhost:3007"
  126. # Where your instance of ShareLaTeX can be found publically. Used in emails
  127. # that are sent out, generated links, etc.
  128. siteUrl : 'http://localhost:3000'
  129. # Same, but with http auth credentials.
  130. httpAuthSiteUrl: 'http://#{httpAuthUser}:#{httpAuthPass}@localhost:3000'
  131. # Security
  132. # --------
  133. security:
  134. sessionSecret: sessionSecret
  135. httpAuthUsers: httpAuthUsers
  136. # Default features
  137. # ----------------
  138. #
  139. # You can select the features that are enabled by default for new
  140. # new users.
  141. defaultFeatures: defaultFeatures =
  142. collaborators: -1
  143. dropbox: true
  144. versioning: true
  145. plans: plans = [{
  146. planCode: "personal"
  147. name: "Personal"
  148. price: 0
  149. features: defaultFeatures
  150. }]
  151. # Spelling languages
  152. # ------------------
  153. #
  154. # You must have the corresponding aspell package installed to
  155. # be able to use a language.
  156. languages: [
  157. {name: "English", code: "en"}
  158. ]
  159. # Email support
  160. # -------------
  161. #
  162. # ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
  163. # To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
  164. #email:
  165. # Who should emails be from by default?
  166. # fromAddress: ""
  167. # The default replyTo field, if it should be set
  168. # replyTo: ""
  169. # lifecycle: false
  170. ## Example transport and parameter settings for Amazon SES
  171. # transport: "SES"
  172. # parameters:
  173. # AWSAccessKeyID: ""
  174. # AWSSecretKey: ""
  175. # Third party services
  176. # --------------------
  177. #
  178. # ShareLaTeX's regular newsletter is managed by Markdown mail. Add your
  179. # credentials here to integrate with this.
  180. # markdownmail:
  181. # secret: ""
  182. # list_id: ""
  183. #
  184. # Fill in your unique token from various analytics services to enable
  185. # them.
  186. # analytics:
  187. # mixpanel:
  188. # token: ""
  189. # ga:
  190. # token: ""
  191. # heap:
  192. # token: ""
  193. #
  194. # ShareLaTeX's help desk is provided by tenderapp.com
  195. # tenderUrl: ""
  196. #
  197. # Production Settings
  198. # -------------------
  199. # Should javascript assets be served minified or not. Note that you will
  200. # need to run `grunt compile:minify` within the web-sharelatex directory
  201. # to generate these.
  202. useMinifiedJs: false
  203. # Should static assets be sent with a header to tell the browser to cache
  204. # them.
  205. cacheStaticAssets: false
  206. # If you are running ShareLaTeX over https, set this to true to send the
  207. # cookie with a secure flag (recommended).
  208. secureCookie: false
  209. # Internal configs
  210. # ----------------
  211. path:
  212. # If we ever need to write something to disk (e.g. incoming requests
  213. # that need processing but may be too big for memory, then write
  214. # them to disk here).
  215. dumpFolder: Path.resolve "data/dumpFolder"
  216. # Where to write the project to disk before running LaTeX on it
  217. compilesDir: Path.resolve(__dirname + "/../compiles")
  218. # Where to cache downloaded URLs for the CLSI
  219. clsiCacheDir: Path.resolve(__dirname + "/../cache")
  220. # Automatic Snapshots
  221. # -------------------
  222. automaticSnapshots:
  223. # How long should we wait after the user last edited to
  224. # take a snapshot?
  225. waitTimeAfterLastEdit: 5 * minutes
  226. # Even if edits are still taking place, this is maximum
  227. # time to wait before taking another snapshot.
  228. maxTimeBetweenSnapshots: 30 * minutes
  229. # Smoke test
  230. # ----------
  231. # Provide log in credentials and a project to be able to run
  232. # some basic smoke tests to check the core functionality.
  233. #
  234. # smokeTest:
  235. # user: ""
  236. # password: ""
  237. # projectId: ""
  238. # Filestore health check
  239. # ----------------------
  240. # Project and file details to check in filestore when calling /health_check
  241. # health_check:
  242. # project_id: ""
  243. # file_id: ""