settings.development.coffee.example 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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. filestore:
  78. port: filestorePort = 3009
  79. host: "localhost"
  80. chat:
  81. port: chatPort = 3010
  82. host: "localhost"
  83. tags:
  84. port: tagsPort = 3012
  85. host: "localhost"
  86. clsi:
  87. port: clsiPort = 3013
  88. host: "localhost"
  89. trackchanges:
  90. port: trackchangesPort = 3015
  91. host: "localhost"
  92. docstore:
  93. port: docstorePort = 3016
  94. host: "localhost"
  95. # Tell each service where to find the other services. If everything
  96. # is running locally then this is easy, but they exist as separate config
  97. # options incase you want to run some services on remote hosts.
  98. apis:
  99. web:
  100. url: "http://localhost:#{webPort}"
  101. user: httpAuthUser
  102. pass: httpAuthPass
  103. documentupdater:
  104. url : "http://localhost:#{docUpdaterPort}"
  105. clsi:
  106. url: "http://localhost:#{clsiPort}"
  107. filestore:
  108. url: "http://localhost:#{filestorePort}"
  109. trackchanges:
  110. url: "http://localhost:#{trackchangesPort}"
  111. docstore:
  112. url: "http://localhost:#{docstorePort}"
  113. thirdPartyDataStore:
  114. url : "http://localhost:3002"
  115. emptyProjectFlushDelayMiliseconds: 5 * seconds
  116. tags:
  117. url :"http://localhost:#{tagsPort}"
  118. spelling:
  119. url : "http://localhost:3005"
  120. versioning:
  121. snapshotwaitms:3000
  122. url: "http://localhost:4000"
  123. username: httpAuthUser
  124. password: httpAuthPass
  125. recurly:
  126. privateKey: ""
  127. apiKey: ""
  128. subdomain: ""
  129. chat:
  130. url: "http://localhost:#{chatPort}"
  131. templates:
  132. port: 3007
  133. blog:
  134. port: 3008
  135. templates_api:
  136. url: "http://localhost:3007"
  137. # Where your instance of ShareLaTeX can be found publically. Used in emails
  138. # that are sent out, generated links, etc.
  139. siteUrl : 'http://localhost:3000'
  140. # Same, but with http auth credentials.
  141. httpAuthSiteUrl: 'http://#{httpAuthUser}:#{httpAuthPass}@localhost:3000'
  142. # Security
  143. # --------
  144. security:
  145. sessionSecret: sessionSecret
  146. httpAuthUsers: httpAuthUsers
  147. # Default features
  148. # ----------------
  149. #
  150. # You can select the features that are enabled by default for new
  151. # new users.
  152. defaultFeatures: defaultFeatures =
  153. collaborators: -1
  154. dropbox: true
  155. versioning: true
  156. plans: plans = [{
  157. planCode: "personal"
  158. name: "Personal"
  159. price: 0
  160. features: defaultFeatures
  161. }]
  162. # Spelling languages
  163. # ------------------
  164. #
  165. # You must have the corresponding aspell package installed to
  166. # be able to use a language.
  167. languages: [
  168. {name: "English", code: "en"}
  169. ]
  170. # Email support
  171. # -------------
  172. #
  173. # ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
  174. # To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
  175. # email:
  176. # fromAddress: ""
  177. # replyTo: ""
  178. # lifecycle: false
  179. # transport: "SES"
  180. # parameters:
  181. # AWSAccessKeyID: ""
  182. # AWSSecretKey: ""
  183. # Third party services
  184. # --------------------
  185. #
  186. # ShareLaTeX's regular newsletter is managed by Markdown mail. Add your
  187. # credentials here to integrate with this.
  188. # markdownmail:
  189. # secret: ""
  190. # list_id: ""
  191. #
  192. # Fill in your unique token from various analytics services to enable
  193. # them.
  194. # analytics:
  195. # mixpanel:
  196. # token: ""
  197. # ga:
  198. # token: ""
  199. # heap:
  200. # token: ""
  201. #
  202. # ShareLaTeX's help desk is provided by tenderapp.com
  203. # tenderUrl: ""
  204. #
  205. # Production Settings
  206. # -------------------
  207. # Should javascript assets be served minified or not. Note that you will
  208. # need to run `grunt compile:minify` within the web-sharelatex directory
  209. # to generate these.
  210. useMinifiedJs: false
  211. # Should static assets be sent with a header to tell the browser to cache
  212. # them.
  213. cacheStaticAssets: false
  214. # If you are running ShareLaTeX over https, set this to true to send the
  215. # cookie with a secure flag (recommended).
  216. secureCookie: false
  217. # Internal configs
  218. # ----------------
  219. path:
  220. # If we ever need to write something to disk (e.g. incoming requests
  221. # that need processing but may be too big for memory, then write
  222. # them to disk here).
  223. dumpFolder: Path.resolve "data/dumpFolder"
  224. # Where to write the project to disk before running LaTeX on it
  225. compilesDir: Path.resolve(__dirname + "/../compiles")
  226. # Where to cache downloaded URLs for the CLSI
  227. clsiCacheDir: Path.resolve(__dirname + "/../cache")
  228. # Automatic Snapshots
  229. # -------------------
  230. automaticSnapshots:
  231. # How long should we wait after the user last edited to
  232. # take a snapshot?
  233. waitTimeAfterLastEdit: 5 * minutes
  234. # Even if edits are still taking place, this is maximum
  235. # time to wait before taking another snapshot.
  236. maxTimeBetweenSnapshots: 30 * minutes
  237. # Smoke test
  238. # ----------
  239. # Provide log in credentials and a project to be able to run
  240. # some basic smoke tests to check the core functionality.
  241. #
  242. # smokeTest:
  243. # user: ""
  244. # password: ""
  245. # projectId: ""
  246. # Filestore health check
  247. # ----------------------
  248. # Project and file details to check in filestore when calling /health_check
  249. # health_check:
  250. # project_id: ""
  251. # file_id: ""