settings.defaults.coffee 11 KB

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