Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

582 wiersze
20 KiB

4 lat temu
  1. /**
  2. * THIS IS THE SETTINGS FILE THAT IS COPIED INSIDE THE DOCKER CONTAINER.
  3. *
  4. * By default, some runtime customizations are supported (see the
  5. * documentation).
  6. *
  7. * If you need more control, edit this file and rebuild the container.
  8. */
  9. /*
  10. * This file must be valid JSON. But comments are allowed
  11. *
  12. * Please edit settings.json, not settings.json.template
  13. *
  14. * Please note that starting from Etherpad 1.6.0 you can store DB credentials in
  15. * a separate file (credentials.json).
  16. *
  17. *
  18. * ENVIRONMENT VARIABLE SUBSTITUTION
  19. * =================================
  20. *
  21. * All the configuration values can be read from environment variables using the
  22. * syntax "${ENV_VAR}" or "${ENV_VAR:default_value}".
  23. *
  24. * This is useful, for example, when running in a Docker container.
  25. *
  26. * EXAMPLE:
  27. * "port": "${PORT:9001}"
  28. * "minify": "${MINIFY}"
  29. * "skinName": "${SKIN_NAME:colibris}"
  30. *
  31. * Would read the configuration values for those items from the environment
  32. * variables PORT, MINIFY and SKIN_NAME.
  33. *
  34. * If PORT and SKIN_NAME variables were not defined, the default values 9001 and
  35. * "colibris" would be used.
  36. * The configuration value "minify", on the other hand, does not have a
  37. * designated default value. Thus, if the environment variable MINIFY were
  38. * undefined, "minify" would be null.
  39. *
  40. * REMARKS:
  41. * 1) please note that variable substitution always needs to be quoted.
  42. *
  43. * "port": 9001, <-- Literal values. When not using
  44. * "minify": false substitution, only strings must be
  45. * "skinName": "colibris" quoted. Booleans and numbers must not.
  46. *
  47. * "port": "${PORT:9001}" <-- CORRECT: if you want to use a variable
  48. * "minify": "${MINIFY:true}" substitution, put quotes around its name,
  49. * "skinName": "${SKIN_NAME}" even if the required value is a number or
  50. * a boolean.
  51. * Etherpad will take care of rewriting it
  52. * to the proper type if necessary.
  53. *
  54. * "port": ${PORT:9001} <-- ERROR: this is not valid json. Quotes
  55. * "minify": ${MINIFY} around variable names are missing.
  56. * "skinName": ${SKIN_NAME}
  57. *
  58. * 2) Beware of undefined variables and default values: nulls and empty strings
  59. * are different!
  60. *
  61. * This is particularly important for user's passwords (see the relevant
  62. * section):
  63. *
  64. * "password": "${PASSW}" // if PASSW is not defined would result in password === null
  65. * "password": "${PASSW:}" // if PASSW is not defined would result in password === ''
  66. *
  67. * If you want to use an empty value (null) as default value for a variable,
  68. * simply do not set it, without putting any colons: "${ABIWORD}".
  69. *
  70. * 3) if you want to use newlines in the default value of a string parameter,
  71. * use "\n" as usual.
  72. *
  73. * "defaultPadText" : "${DEFAULT_PAD_TEXT}Line 1\nLine 2"
  74. */
  75. {
  76. /*
  77. * Name your instance!
  78. */
  79. "title": "${TITLE:Etherpad}",
  80. /*
  81. * favicon default name
  82. * alternatively, set up a fully specified Url to your own favicon
  83. */
  84. "favicon": "${FAVICON:favicon.ico}",
  85. /*
  86. * Skin name.
  87. *
  88. * Its value has to be an existing directory under src/static/skins.
  89. * You can write your own, or use one of the included ones:
  90. *
  91. * - "no-skin": an empty skin (default). This yields the unmodified,
  92. * traditional Etherpad theme.
  93. * - "colibris": the new experimental skin (since Etherpad 1.8), candidate to
  94. * become the default in Etherpad 2.0
  95. */
  96. "skinName": "${SKIN_NAME:colibris}",
  97. /*
  98. * Skin Variants
  99. *
  100. * Use the UI skin variants builder at /p/test#skinvariantsbuilder
  101. *
  102. * For the colibris skin only, you can choose how to render the three main
  103. * containers:
  104. * - toolbar (top menu with icons)
  105. * - editor (containing the text of the pad)
  106. * - background (area outside of editor, mostly visible when using page style)
  107. *
  108. * For each of the 3 containers you can choose 4 color combinations:
  109. * super-light, light, dark, super-dark.
  110. *
  111. * For example, to make the toolbar dark, you will include "dark-toolbar" into
  112. * skinVariants.
  113. *
  114. * You can provide multiple skin variants separated by spaces. Default
  115. * skinVariant is "super-light-toolbar super-light-editor light-background".
  116. *
  117. * For the editor container, you can also make it full width by adding
  118. * "full-width-editor" variant (by default editor is rendered as a page, with
  119. * a max-width of 900px).
  120. */
  121. "skinVariants": "${SKIN_VARIANTS:super-light-toolbar super-light-editor light-background}",
  122. /*
  123. * IP and port which Etherpad should bind at.
  124. *
  125. * Binding to a Unix socket is also supported: just use an empty string for
  126. * the ip, and put the full path to the socket in the port parameter.
  127. *
  128. * EXAMPLE USING UNIX SOCKET:
  129. * "ip": "", // <-- has to be an empty string
  130. * "port" : "/somepath/etherpad.socket", // <-- path to a Unix socket
  131. */
  132. "ip": "${IP:0.0.0.0}",
  133. "port": "${PORT:9001}",
  134. /*
  135. * Option to hide/show the settings.json in admin page.
  136. *
  137. * Default option is set to true
  138. */
  139. "showSettingsInAdminPage": "${SHOW_SETTINGS_IN_ADMIN_PAGE:true}",
  140. /*
  141. * Node native SSL support
  142. *
  143. * This is disabled by default.
  144. * Make sure to have the minimum and correct file access permissions set so
  145. * that the Etherpad server can access them
  146. */
  147. /*
  148. "ssl" : {
  149. "key" : "/path-to-your/epl-server.key",
  150. "cert" : "/path-to-your/epl-server.crt",
  151. "ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"]
  152. },
  153. */
  154. /*
  155. * The type of the database.
  156. *
  157. * You can choose between many DB drivers, for example: dirty, postgres,
  158. * sqlite, mysql.
  159. *
  160. * You shouldn't use "dirty" for for anything else than testing or
  161. * development.
  162. *
  163. *
  164. * Database specific settings are dependent on dbType, and go in dbSettings.
  165. * Remember that since Etherpad 1.6.0 you can also store these informations in
  166. * credentials.json.
  167. *
  168. * For a complete list of the supported drivers, please refer to:
  169. * https://www.npmjs.com/package/ueberdb2
  170. */
  171. "dbType": "${DB_TYPE:dirty}",
  172. "dbSettings": {
  173. "host": "${DB_HOST}",
  174. "port": "${DB_PORT}",
  175. "database": "${DB_NAME}",
  176. "user": "${DB_USER}",
  177. "password": "${DB_PASS}",
  178. "charset": "${DB_CHARSET}",
  179. "filename": "${DB_FILENAME:var/dirty.db}"
  180. },
  181. /*
  182. * The default text of a pad
  183. */
  184. "defaultPadText" : "${DEFAULT_PAD_TEXT:Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https:\/\/etherpad.org\n}",
  185. /*
  186. * Default Pad behavior.
  187. *
  188. * Change them if you want to override.
  189. */
  190. "padOptions": {
  191. "noColors": "${PAD_OPTIONS_NO_COLORS:false}",
  192. "showControls": "${PAD_OPTIONS_SHOW_CONTROLS:true}",
  193. "showChat": "${PAD_OPTIONS_SHOW_CHAT:true}",
  194. "showLineNumbers": "${PAD_OPTIONS_SHOW_LINE_NUMBERS:true}",
  195. "useMonospaceFont": "${PAD_OPTIONS_USE_MONOSPACE_FONT:false}",
  196. "userName": "${PAD_OPTIONS_USER_NAME:false}",
  197. "userColor": "${PAD_OPTIONS_USER_COLOR:false}",
  198. "rtl": "${PAD_OPTIONS_RTL:false}",
  199. "alwaysShowChat": "${PAD_OPTIONS_ALWAYS_SHOW_CHAT:false}",
  200. "chatAndUsers": "${PAD_OPTIONS_CHAT_AND_USERS:false}",
  201. "lang": "${PAD_OPTIONS_LANG:en-gb}"
  202. },
  203. /*
  204. * Pad Shortcut Keys
  205. */
  206. "padShortcutEnabled" : {
  207. "altF9": "${PAD_SHORTCUTS_ENABLED_ALT_F9:true}", /* focus on the File Menu and/or editbar */
  208. "altC": "${PAD_SHORTCUTS_ENABLED_ALT_C:true}", /* focus on the Chat window */
  209. "cmdShift2": "${PAD_SHORTCUTS_ENABLED_CMD_SHIFT_2:true}", /* shows a gritter popup showing a line author */
  210. "delete": "${PAD_SHORTCUTS_ENABLED_DELETE:true}",
  211. "return": "${PAD_SHORTCUTS_ENABLED_RETURN:true}",
  212. "esc": "${PAD_SHORTCUTS_ENABLED_ESC:true}", /* in mozilla versions 14-19 avoid reconnecting pad */
  213. "cmdS": "${PAD_SHORTCUTS_ENABLED_CMD_S:true}", /* save a revision */
  214. "tab": "${PAD_SHORTCUTS_ENABLED_TAB:true}", /* indent */
  215. "cmdZ": "${PAD_SHORTCUTS_ENABLED_CMD_Z:true}", /* undo/redo */
  216. "cmdY": "${PAD_SHORTCUTS_ENABLED_CMD_Y:true}", /* redo */
  217. "cmdI": "${PAD_SHORTCUTS_ENABLED_CMD_I:true}", /* italic */
  218. "cmdB": "${PAD_SHORTCUTS_ENABLED_CMD_B:true}", /* bold */
  219. "cmdU": "${PAD_SHORTCUTS_ENABLED_CMD_U:true}", /* underline */
  220. "cmd5": "${PAD_SHORTCUTS_ENABLED_CMD_5:true}", /* strike through */
  221. "cmdShiftL": "${PAD_SHORTCUTS_ENABLED_CMD_SHIFT_L:true}", /* unordered list */
  222. "cmdShiftN": "${PAD_SHORTCUTS_ENABLED_CMD_SHIFT_N:true}", /* ordered list */
  223. "cmdShift1": "${PAD_SHORTCUTS_ENABLED_CMD_SHIFT_1:true}", /* ordered list */
  224. "cmdShiftC": "${PAD_SHORTCUTS_ENABLED_CMD_SHIFT_C:true}", /* clear authorship */
  225. "cmdH": "${PAD_SHORTCUTS_ENABLED_CMD_H:true}", /* backspace */
  226. "ctrlHome": "${PAD_SHORTCUTS_ENABLED_CTRL_HOME:true}", /* scroll to top of pad */
  227. "pageUp": "${PAD_SHORTCUTS_ENABLED_PAGE_UP:true}",
  228. "pageDown": "${PAD_SHORTCUTS_ENABLED_PAGE_DOWN:true}"
  229. },
  230. /*
  231. * Should we suppress errors from being visible in the default Pad Text?
  232. */
  233. "suppressErrorsInPadText": "${SUPPRESS_ERRORS_IN_PAD_TEXT:false}",
  234. /*
  235. * If this option is enabled, a user must have a session to access pads.
  236. * This effectively allows only group pads to be accessed.
  237. */
  238. "requireSession": "${REQUIRE_SESSION:false}",
  239. /*
  240. * Users may edit pads but not create new ones.
  241. *
  242. * Pad creation is only via the API.
  243. * This applies both to group pads and regular pads.
  244. */
  245. "editOnly": "${EDIT_ONLY:false}",
  246. /*
  247. * If true, all css & js will be minified before sending to the client.
  248. *
  249. * This will improve the loading performance massively, but makes it difficult
  250. * to debug the javascript/css
  251. */
  252. "minify": "${MINIFY:true}",
  253. /*
  254. * How long may clients use served javascript code (in seconds)?
  255. *
  256. * Not setting this may cause problems during deployment.
  257. * Set to 0 to disable caching.
  258. */
  259. "maxAge": "${MAX_AGE:21600}", // 60 * 60 * 6 = 6 hours
  260. /*
  261. * Absolute path to the Abiword executable.
  262. *
  263. * Abiword is needed to get advanced import/export features of pads. Setting
  264. * it to null disables Abiword and will only allow plain text and HTML
  265. * import/exports.
  266. */
  267. "abiword": "${ABIWORD}",
  268. /*
  269. * This is the absolute path to the soffice executable.
  270. *
  271. * LibreOffice can be used in lieu of Abiword to export pads.
  272. * Setting it to null disables LibreOffice exporting.
  273. */
  274. "soffice": "${SOFFICE}",
  275. /*
  276. * Path to the Tidy executable.
  277. *
  278. * Tidy is used to improve the quality of exported pads.
  279. * Setting it to null disables Tidy.
  280. */
  281. "tidyHtml": "${TIDY_HTML}",
  282. /*
  283. * Allow import of file types other than the supported ones:
  284. * txt, doc, docx, rtf, odt, html & htm
  285. */
  286. "allowUnknownFileEnds": "${ALLOW_UNKNOWN_FILE_ENDS:true}",
  287. /*
  288. * This setting is used if you require authentication of all users.
  289. *
  290. * Note: "/admin" always requires authentication.
  291. */
  292. "requireAuthentication": "${REQUIRE_AUTHENTICATION:false}",
  293. /*
  294. * Require authorization by a module, or a user with is_admin set, see below.
  295. */
  296. "requireAuthorization": "${REQUIRE_AUTHORIZATION:false}",
  297. /*
  298. * When you use NGINX or another proxy/load-balancer set this to true.
  299. *
  300. * This is especially necessary when the reverse proxy performs SSL
  301. * termination, otherwise the cookies will not have the "secure" flag.
  302. *
  303. * The other effect will be that the logs will contain the real client's IP,
  304. * instead of the reverse proxy's IP.
  305. */
  306. "trustProxy": "${TRUST_PROXY:false}",
  307. /*
  308. * Settings controlling the session cookie issued by Etherpad.
  309. */
  310. "cookie": {
  311. /*
  312. * Value of the SameSite cookie property. "Lax" is recommended unless
  313. * Etherpad will be embedded in an iframe from another site, in which case
  314. * this must be set to "None". Note: "None" will not work (the browser will
  315. * not send the cookie to Etherpad) unless https is used to access Etherpad
  316. * (either directly or via a reverse proxy with "trustProxy" set to true).
  317. *
  318. * "Strict" is not recommended because it has few security benefits but
  319. * significant usability drawbacks vs. "Lax". See
  320. * https://stackoverflow.com/q/41841880 for discussion.
  321. */
  322. "sameSite": "${COOKIE_SAME_SITE:Lax}"
  323. },
  324. /*
  325. * Privacy: disable IP logging
  326. */
  327. "disableIPlogging": "${DISABLE_IP_LOGGING:false}",
  328. /*
  329. * Time (in seconds) to automatically reconnect pad when a "Force reconnect"
  330. * message is shown to user.
  331. *
  332. * Set to 0 to disable automatic reconnection.
  333. */
  334. "automaticReconnectionTimeout": "${AUTOMATIC_RECONNECTION_TIMEOUT:0}",
  335. /*
  336. * By default, when caret is moved out of viewport, it scrolls the minimum
  337. * height needed to make this line visible.
  338. */
  339. "scrollWhenFocusLineIsOutOfViewport": {
  340. /*
  341. * Percentage of viewport height to be additionally scrolled.
  342. *
  343. * E.g.: use "percentage.editionAboveViewport": 0.5, to place caret line in
  344. * the middle of viewport, when user edits a line above of the
  345. * viewport
  346. *
  347. * Set to 0 to disable extra scrolling
  348. */
  349. "percentage": {
  350. "editionAboveViewport": "${FOCUS_LINE_PERCENTAGE_ABOVE:0}",
  351. "editionBelowViewport": "${FOCUS_LINE_PERCENTAGE_BELOW:0}"
  352. },
  353. /*
  354. * Time (in milliseconds) used to animate the scroll transition.
  355. * Set to 0 to disable animation
  356. */
  357. "duration": "${FOCUS_LINE_DURATION:0}",
  358. /*
  359. * Flag to control if it should scroll when user places the caret in the
  360. * last line of the viewport
  361. */
  362. "scrollWhenCaretIsInTheLastLineOfViewport": "${FOCUS_LINE_CARET_SCROLL:false}",
  363. /*
  364. * Percentage of viewport height to be additionally scrolled when user
  365. * presses arrow up in the line of the top of the viewport.
  366. *
  367. * Set to 0 to let the scroll to be handled as default by Etherpad
  368. */
  369. "percentageToScrollWhenUserPressesArrowUp": "${FOCUS_LINE_PERCENTAGE_ARROW_UP:0}"
  370. },
  371. /*
  372. * User accounts. These accounts are used by:
  373. * - default HTTP basic authentication if no plugin handles authentication
  374. * - some but not all authentication plugins
  375. * - some but not all authorization plugins
  376. *
  377. * User properties:
  378. * - password: The user's password. Some authentication plugins will ignore
  379. * this.
  380. * - is_admin: true gives access to /admin. Defaults to false. If you do not
  381. * uncomment this, /admin will not be available!
  382. * - readOnly: If true, this user will not be able to create new pads or
  383. * modify existing pads. Defaults to false.
  384. * - canCreate: If this is true and readOnly is false, this user can create
  385. * new pads. Defaults to true.
  386. *
  387. * Authentication and authorization plugins may define additional properties.
  388. *
  389. * WARNING: passwords should not be stored in plaintext in this file.
  390. * If you want to mitigate this, please install ep_hash_auth and
  391. * follow the section "secure your installation" in README.md
  392. */
  393. "users": {
  394. "admin": {
  395. // 1) "password" can be replaced with "hash" if you install ep_hash_auth
  396. // 2) please note that if password is null, the user will not be created
  397. "password": "${ADMIN_PASSWORD}",
  398. "is_admin": true
  399. },
  400. "user": {
  401. // 1) "password" can be replaced with "hash" if you install ep_hash_auth
  402. // 2) please note that if password is null, the user will not be created
  403. "password": "${USER_PASSWORD}",
  404. "is_admin": false
  405. }
  406. },
  407. /*
  408. * Restrict socket.io transport methods
  409. */
  410. "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
  411. /*
  412. * Allow Load Testing tools to hit the Etherpad Instance.
  413. *
  414. * WARNING: this will disable security on the instance.
  415. */
  416. "loadTest": "${LOAD_TEST:false}",
  417. /*
  418. * Disable indentation on new line when previous line ends with some special
  419. * chars (':', '[', '(', '{')
  420. */
  421. /*
  422. "indentationOnNewLine": false,
  423. */
  424. /*
  425. * From Etherpad 1.8.3 onwards, import and export of pads is always rate
  426. * limited.
  427. *
  428. * The default is to allow at most 10 requests per IP in a 90 seconds window.
  429. * After that the import/export request is rejected.
  430. *
  431. * See https://github.com/nfriedly/express-rate-limit for more options
  432. */
  433. "importExportRateLimiting": {
  434. // duration of the rate limit window (milliseconds)
  435. "windowMs": "${IMPORT_EXPORT_RATE_LIMIT_WINDOW:90000}",
  436. // maximum number of requests per IP to allow during the rate limit window
  437. "max": "${IMPORT_EXPORT_MAX_REQ_PER_IP:10}"
  438. },
  439. /*
  440. * From Etherpad 1.8.3 onwards, the maximum allowed size for a single imported
  441. * file is always bounded.
  442. *
  443. * File size is specified in bytes. Default is 50 MB.
  444. */
  445. "importMaxFileSize": "${IMPORT_MAX_FILE_SIZE:52428800}", // 50 * 1024 * 1024
  446. /*
  447. * Toolbar buttons configuration.
  448. *
  449. * Uncomment to customize.
  450. */
  451. /*
  452. "toolbar": {
  453. "left": [
  454. ["bold", "italic", "underline", "strikethrough"],
  455. ["orderedlist", "unorderedlist", "indent", "outdent"],
  456. ["undo", "redo"],
  457. ["clearauthorship"]
  458. ],
  459. "right": [
  460. ["importexport", "timeslider", "savedrevision"],
  461. ["settings", "embed"],
  462. ["showusers"]
  463. ],
  464. "timeslider": [
  465. ["timeslider_export", "timeslider_returnToPad"]
  466. ]
  467. },
  468. */
  469. /*
  470. * Expose Etherpad version in the web interface and in the Server http header.
  471. *
  472. * Do not enable on production machines.
  473. */
  474. "exposeVersion": "${EXPOSE_VERSION:false}",
  475. /*
  476. * The log level we are using.
  477. *
  478. * Valid values: DEBUG, INFO, WARN, ERROR
  479. */
  480. "loglevel": "${LOGLEVEL:INFO}",
  481. /*
  482. * Logging configuration. See log4js documentation for further information:
  483. * https://github.com/nomiddlename/log4js-node
  484. *
  485. * You can add as many appenders as you want here.
  486. */
  487. "logconfig" :
  488. { "appenders": [
  489. { "type": "console"
  490. //, "category": "access"// only logs pad access
  491. }
  492. /*
  493. , { "type": "file"
  494. , "filename": "your-log-file-here.log"
  495. , "maxLogSize": 1024
  496. , "backups": 3 // how many log files there're gonna be at max
  497. //, "category": "test" // only log a specific category
  498. }
  499. */
  500. /*
  501. , { "type": "logLevelFilter"
  502. , "level": "warn" // filters out all log messages that have a lower level than "error"
  503. , "appender":
  504. { Use whatever appender you want here }
  505. }
  506. */
  507. /*
  508. , { "type": "logLevelFilter"
  509. , "level": "error" // filters out all log messages that have a lower level than "error"
  510. , "appender":
  511. { "type": "smtp"
  512. , "subject": "An error occurred in your EPL instance!"
  513. , "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
  514. , "sendInterval": 300 // 60 * 5 = 5 minutes -- will buffer log messages; set to 0 to send a mail for every message
  515. , "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
  516. "host": "smtp.example.com", "port": 465,
  517. "secureConnection": true,
  518. "auth": {
  519. "user": "foo@example.com",
  520. "pass": "bar_foo"
  521. }
  522. }
  523. }
  524. }
  525. */
  526. ]
  527. }, // logconfig
  528. /* Override any strings found in locale directories */
  529. "customLocaleStrings": {}
  530. }