settings.development.coffee.example 6.2 KB

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