settings.defaults.coffee 8.7 KB

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