settings.defaults.coffee 9.7 KB

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