settings.defaults.coffee 10 KB

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