settings.development.coffee.example 6.2 KB

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