settings.defaults.coffee 10 KB

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