fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB

  1. #+PROPERTY: Effort_ALL 0 0:30 1:00 2:00 0.5d 1d 1.5d 2d 3d 4d 5d
  2. #+PROPERTY: Max_effort_ALL 0 0:30 1:00 2:00 0.5d 1d 1.5d 2d 3d 4d 5d
  3. #+PROPERTY: header-args:python :var filename=(buffer-file-name)
  4. #+PROPERTY: header-args:sh :var filename=(buffer-file-name)
  5. #+TODO: TODO WIP BLOCKED | DONE CANCELED
  6. #+LATEX_HEADER: \usepackage[margin=0.5in]{geometry}
  7. #+LaTeX_CLASS: article
  8. #+OPTIONS: H:8 ^:nil prop:("Effort" "Max_effort") tags:not-in-toc
  9. #+COLUMNS: %50ITEM %Effort(Min Effort) %Max_effort(Max Effort)
  10. #+begin_LaTeX
  11. \hypersetup{
  12. linkcolor=blue,
  13. pdfborder={0 0 0 0}
  14. }
  15. #+end_LaTeX
  16. #+TITLE: Peertube charm management
  17. #+LATEX: \pagebreak
  18. Keep information related to the usage and the development of the charm.
  19. #+LATEX: \pagebreak
  20. #+LATEX: \pagebreak
  21. * Todos
  22. ** TODO Logrotatability
  23. Peertube uses ``winston`` nodejs logging mecanism, and has what I
  24. understand, hard-written transports to file:
  25. Content of =server/helpers/logger.ts=
  26. #+BEGIN_SRC ts
  27. ...
  28. const logger = winston.createLogger({
  29. level: CONFIG.LOG.LEVEL,
  30. format: winston.format.combine(
  31. labelFormatter,
  32. winston.format.splat()
  33. ),
  34. transports: [
  35. new winston.transports.File({
  36. filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube.log'),
  37. handleExceptions: true,
  38. maxsize: 1024 * 1024 * 12,
  39. maxFiles: 5,
  40. format: winston.format.combine(
  41. winston.format.timestamp(),
  42. jsonLoggerFormat
  43. )
  44. }),
  45. new winston.transports.Console({
  46. handleExceptions: true,
  47. format: winston.format.combine(
  48. timestampFormatter,
  49. winston.format.colorize(),
  50. consoleLoggerFormat
  51. )
  52. })
  53. ],
  54. exitOnError: true
  55. })
  56. #+END_SRC
  57. This will ensure some part of the rotation. Which is bad.
  58. We don't want peertube to manage the logs. So depending on what we
  59. want to do in the future with the managing of logs, I'll need to patch
  60. peertube to probably use only stdout, and/or send it to rsyslog.
  61. For now, situation of log rotation with all charm is using logrotate,
  62. but I know this might not be the perfect solution as I'd like to stick
  63. to =logs are streams=, and avoid having to find mecanism of reloading
  64. application after rotation.
  65. A good solution would be to use the stdout/stderr of the application,
  66. and have a generic solution using ``docker logs`` json output.
  67. ** TODO changing root password
  68. This will probably require also a patch, as the password is set for
  69. user 'root' automatically and is to be read in the logs (duh !).
  70. We can't initialise the application (and ask for postgres table, and
  71. root user to be created, then quit). So we can't do that in the
  72. =hooks/init= script in a reasonable manner.
  73. There is a special ``npm run reset-password`` with odd arguments that
  74. can reset root password, only if database already populated.
  75. I need a patch to simply set password from base server configuration.