settings.defaults.coffee 9.4 KB

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