settings.defaults.coffee 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  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 = settings =
  15. allowAnonymousReadAndWriteSharing:
  16. process.env['SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING'] == 'true'
  17. # File storage
  18. # ------------
  19. #
  20. # ShareLaTeX stores binary files like images in S3.
  21. # Fill in your Amazon S3 credential below.
  22. s3:
  23. key: ""
  24. secret: ""
  25. bucketName : ""
  26. # Databases
  27. # ---------
  28. mongo:
  29. url : 'mongodb://127.0.0.1/sharelatex'
  30. redis:
  31. web:
  32. host: "localhost"
  33. port: "6379"
  34. password: ""
  35. # websessions:
  36. # cluster: [
  37. # {host: 'localhost', port: 7000}
  38. # {host: 'localhost', port: 7001}
  39. # {host: 'localhost', port: 7002}
  40. # {host: 'localhost', port: 7003}
  41. # {host: 'localhost', port: 7004}
  42. # {host: 'localhost', port: 7005}
  43. # ]
  44. # ratelimiter:
  45. # cluster: [
  46. # {host: 'localhost', port: 7000}
  47. # {host: 'localhost', port: 7001}
  48. # {host: 'localhost', port: 7002}
  49. # {host: 'localhost', port: 7003}
  50. # {host: 'localhost', port: 7004}
  51. # {host: 'localhost', port: 7005}
  52. # ]
  53. # cooldown:
  54. # cluster: [
  55. # {host: 'localhost', port: 7000}
  56. # {host: 'localhost', port: 7001}
  57. # {host: 'localhost', port: 7002}
  58. # {host: 'localhost', port: 7003}
  59. # {host: 'localhost', port: 7004}
  60. # {host: 'localhost', port: 7005}
  61. # ]
  62. api:
  63. host: "localhost"
  64. port: "6379"
  65. password: ""
  66. # Service locations
  67. # -----------------
  68. # Configure which ports to run each service on. Generally you
  69. # can leave these as they are unless you have some other services
  70. # running which conflict, or want to run the web process on port 80.
  71. internal:
  72. web:
  73. port: webPort = 3000
  74. documentupdater:
  75. port: docUpdaterPort = 3003
  76. # Tell each service where to find the other services. If everything
  77. # is running locally then this is easy, but they exist as separate config
  78. # options incase you want to run some services on remote hosts.
  79. apis:
  80. web:
  81. url: "http://localhost:#{webPort}"
  82. user: httpAuthUser
  83. pass: httpAuthPass
  84. documentupdater:
  85. url : "http://localhost:#{docUpdaterPort}"
  86. thirdPartyDataStore:
  87. url : "http://localhost:3002"
  88. emptyProjectFlushDelayMiliseconds: 5 * seconds
  89. tags:
  90. url :"http://localhost:3012"
  91. spelling:
  92. url : "http://localhost:3005"
  93. trackchanges:
  94. url : "http://localhost:3015"
  95. docstore:
  96. url : "http://localhost:3016"
  97. pubUrl: "http://localhost:3016"
  98. chat:
  99. url: "http://localhost:3010"
  100. internal_url: "http://localhost:3010"
  101. blog:
  102. port: 3008
  103. university:
  104. url: "http://localhost:3011"
  105. filestore:
  106. url: "http://localhost:3009"
  107. clsi:
  108. url: "http://localhost:3013"
  109. templates:
  110. url: "http://localhost:3007"
  111. githubSync:
  112. url: "http://localhost:3022"
  113. recurly:
  114. privateKey: ""
  115. apiKey: ""
  116. subdomain: ""
  117. geoIpLookup:
  118. url: "http://localhost:8080/json"
  119. realTime:
  120. url: "http://localhost:3026"
  121. contacts:
  122. url: "http://localhost:3036"
  123. sixpack:
  124. url: ""
  125. # references:
  126. # url: "http://localhost:3040"
  127. notifications:
  128. url: "http://localhost:3042"
  129. templates:
  130. user_id: process.env.TEMPLATES_USER_ID or "5395eb7aad1f29a88756c7f2"
  131. showSocialButtons: false
  132. showComments: false
  133. # cdn:
  134. # web:
  135. # host:"http://nowhere.sharelatex.dev"
  136. # darkHost:"http://cdn.sharelatex.dev:3000"
  137. # Where your instance of ShareLaTeX can be found publically. Used in emails
  138. # that are sent out, generated links, etc.
  139. siteUrl : siteUrl = 'http://localhost:3000'
  140. # cookie domain
  141. # use full domain for cookies to only be accessible from that domain,
  142. # replace subdomain with dot to have them accessible on all subdomains
  143. # cookieDomain: ".sharelatex.dev"
  144. cookieName:"sharelatex.sid"
  145. # this is only used if cookies are used for clsi backend
  146. #clsiCookieKey: "clsiserver"
  147. # Same, but with http auth credentials.
  148. httpAuthSiteUrl: 'http://#{httpAuthUser}:#{httpAuthPass}@localhost:3000'
  149. maxEntitiesPerProject: 2000
  150. # Security
  151. # --------
  152. security:
  153. sessionSecret: sessionSecret
  154. bcryptRounds: 12 # number of rounds used to hash user passwords (raised to power 2)
  155. httpAuthUsers: httpAuthUsers
  156. # Default features
  157. # ----------------
  158. #
  159. # You can select the features that are enabled by default for new
  160. # new users.
  161. defaultFeatures: defaultFeatures =
  162. collaborators: -1
  163. dropbox: true
  164. versioning: true
  165. compileTimeout: 180
  166. compileGroup: "standard"
  167. references: true
  168. templates: true
  169. trackChanges: true
  170. plans: plans = [{
  171. planCode: "personal"
  172. name: "Personal"
  173. price: 0
  174. features: defaultFeatures
  175. }]
  176. enableSubscriptions:false
  177. # i18n
  178. # ------
  179. #
  180. i18n:
  181. subdomainLang:
  182. www: {lngCode:"en", url: siteUrl}
  183. defaultLng: "en"
  184. # Spelling languages
  185. # ------------------
  186. #
  187. # You must have the corresponding aspell package installed to
  188. # be able to use a language.
  189. languages: [
  190. {name: "English", code: "en"},
  191. {name: "French", code: "fr"}
  192. ]
  193. # Password Settings
  194. # -----------
  195. # These restrict the passwords users can use when registering
  196. # opts are from http://antelle.github.io/passfield
  197. # passwordStrengthOptions:
  198. # pattern: "aA$3"
  199. # length:
  200. # min: 6
  201. # max: 128
  202. # Email support
  203. # -------------
  204. #
  205. # ShareLaTeX uses nodemailer (http://www.nodemailer.com/) to send transactional emails.
  206. # To see the range of transport and options they support, see http://www.nodemailer.com/docs/transports
  207. #email:
  208. # fromAddress: ""
  209. # replyTo: ""
  210. # lifecycle: false
  211. ## Example transport and parameter settings for Amazon SES
  212. # transport: "SES"
  213. # parameters:
  214. # AWSAccessKeyID: ""
  215. # AWSSecretKey: ""
  216. # Third party services
  217. # --------------------
  218. #
  219. # ShareLaTeX's regular newsletter is managed by Markdown mail. Add your
  220. # credentials here to integrate with this.
  221. # markdownmail:
  222. # secret: ""
  223. # list_id: ""
  224. #
  225. # Fill in your unique token from various analytics services to enable
  226. # them.
  227. # analytics:
  228. # ga:
  229. # token: ""
  230. #
  231. # ShareLaTeX's help desk is provided by tenderapp.com
  232. # tenderUrl: ""
  233. #
  234. # Client-side error logging is provided by getsentry.com
  235. # sentry:
  236. # src: ""
  237. # publicDSN: ""
  238. #
  239. # src should be either a remote url like
  240. # //cdn.ravenjs.com/1.1.22/jquery,native/raven.min.js
  241. # or a local file in the js/libs directory.
  242. # The publicDSN is the token for the client-side getSentry service.
  243. # Production Settings
  244. # -------------------
  245. # Should javascript assets be served minified or not. Note that you will
  246. # need to run `grunt compile:minify` within the web-sharelatex directory
  247. # to generate these.
  248. useMinifiedJs: false
  249. # Should static assets be sent with a header to tell the browser to cache
  250. # them.
  251. cacheStaticAssets: false
  252. # If you are running ShareLaTeX over https, set this to true to send the
  253. # cookie with a secure flag (recommended).
  254. secureCookie: false
  255. # If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
  256. # then set this to true to allow it to correctly detect the forwarded IP
  257. # address and http/https protocol information.
  258. behindProxy: false
  259. # Cookie max age (in milliseconds). Set to false for a browser session.
  260. cookieSessionLength: 5 * 24 * 60 * 60 * 1000 # 5 days
  261. # When true, only allow invites to be sent to email addresses that
  262. # already have user accounts
  263. restrictInvitesToExistingAccounts: false
  264. # Should we allow access to any page without logging in? This includes
  265. # public projects, /learn, /templates, about pages, etc.
  266. allowPublicAccess: if process.env["SHARELATEX_ALLOW_PUBLIC_ACCESS"] == 'true' then true else false
  267. # Use a single compile directory for all users in a project
  268. # (otherwise each user has their own directory)
  269. # disablePerUserCompiles: true
  270. # Maximum size of text documents in the real-time editing system.
  271. max_doc_length: 2 * 1024 * 1024 # 2mb
  272. # Internal configs
  273. # ----------------
  274. path:
  275. # If we ever need to write something to disk (e.g. incoming requests
  276. # that need processing but may be too big for memory, then write
  277. # them to disk here).
  278. dumpFolder: Path.resolve __dirname + "/../data/dumpFolder"
  279. uploadFolder: Path.resolve __dirname + "/../data/uploads"
  280. # Automatic Snapshots
  281. # -------------------
  282. automaticSnapshots:
  283. # How long should we wait after the user last edited to
  284. # take a snapshot?
  285. waitTimeAfterLastEdit: 5 * minutes
  286. # Even if edits are still taking place, this is maximum
  287. # time to wait before taking another snapshot.
  288. maxTimeBetweenSnapshots: 30 * minutes
  289. # Smoke test
  290. # ----------
  291. # Provide log in credentials and a project to be able to run
  292. # some basic smoke tests to check the core functionality.
  293. #
  294. # smokeTest:
  295. # user: ""
  296. # password: ""
  297. # projectId: ""
  298. appName: "ShareLaTeX (Community Edition)"
  299. adminEmail: "placeholder@example.com"
  300. brandPrefix: "" # Set to 'ol-' for overleaf styles
  301. nav:
  302. title: "ShareLaTeX Community Edition"
  303. left_footer: [{
  304. text: "Powered by <a href='https://www.sharelatex.com'>ShareLaTeX</a> © 2016"
  305. }]
  306. right_footer: [{
  307. text: "<i class='fa fa-github-square'></i> Fork on Github!"
  308. url: "https://github.com/sharelatex/sharelatex"
  309. }]
  310. showSubscriptionLink: false
  311. header_extras: []
  312. # Example:
  313. # header_extras: [{text: "Some Page", url: "http://example.com/some/page", class: "subdued"}]
  314. customisation: {}
  315. # templates: [{
  316. # name : "cv_or_resume",
  317. # url : "/templates/cv"
  318. # }, {
  319. # name : "cover_letter",
  320. # url : "/templates/cover-letters"
  321. # }, {
  322. # name : "journal_article",
  323. # url : "/templates/journals"
  324. # }, {
  325. # name : "presentation",
  326. # url : "/templates/presentations"
  327. # }, {
  328. # name : "thesis",
  329. # url : "/templates/thesis"
  330. # }, {
  331. # name : "bibliographies",
  332. # url : "/templates/bibliographies"
  333. # }, {
  334. # name : "view_all",
  335. # url : "/templates"
  336. # }]
  337. redirects:
  338. "/templates/index": "/templates/"
  339. proxyUrls: {}
  340. reloadModuleViewsOnEachRequest: true
  341. domainLicences: [
  342. ]
  343. sixpack:
  344. domain:""
  345. # ShareLaTeX Server Pro options (https://www.sharelatex.com/university/onsite.html)
  346. # ----------
  347. # LDAP
  348. # ----------
  349. # Settings below use a working LDAP test server kindly provided by forumsys.com
  350. # When testing with forumsys.com use username = einstein and password = password
  351. # ldap :
  352. # host: 'ldap://ldap.forumsys.com'
  353. # dn: 'uid=:userKey,dc=example,dc=com'
  354. # baseSearch: 'dc=example,dc=com'
  355. # filter: "(uid=:userKey)"
  356. # failMessage: 'LDAP User Fail'
  357. # fieldName: 'LDAP User'
  358. # placeholder: 'email@example.com'
  359. # emailAtt: 'mail'
  360. # anonymous: false
  361. # adminDN: 'cn=read-only-admin,dc=example,dc=com'
  362. # adminPW: 'password'
  363. # starttls: true
  364. # tlsOptions:
  365. # rejectUnauthorized: false
  366. # ca: ['/etc/ldap/ca_certs.pem']
  367. #templateLinks: [{
  368. # name : "CV projects",
  369. # url : "/templates/cv"
  370. #},{
  371. # name : "all projects",
  372. # url: "/templates/all"
  373. #}]