settings.defaults.coffee 10 KB

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