settings.development.coffee.example 6.7 KB

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