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.

2.8 KiB

Peertube charm management

\hypersetup{ linkcolor=blue, pdfborder={0 0 0 0} }

Keep information related to the usage and the development of the charm.


TODO Logrotatability

Peertube uses ``winston`` nodejs logging mecanism, and has what I understand, hard-written transports to file:

Content of server/helpers/logger.ts

const logger = winston.createLogger({
  format: winston.format.combine(
  transports: [
    new winston.transports.File({
      filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube.log'),
      handleExceptions: true,
      maxsize: 1024 * 1024 * 12,
      maxFiles: 5,
      format: winston.format.combine(
    new winston.transports.Console({
      handleExceptions: true,
      format: winston.format.combine(
  exitOnError: true

This will ensure some part of the rotation. Which is bad.

We don't want peertube to manage the logs. So depending on what we want to do in the future with the managing of logs, I'll need to patch peertube to probably use only stdout, and/or send it to rsyslog.

For now, situation of log rotation with all charm is using logrotate, but I know this might not be the perfect solution as I'd like to stick to logs are streams, and avoid having to find mecanism of reloading application after rotation.

A good solution would be to use the stdout/stderr of the application, and have a generic solution using ``docker logs`` json output.

TODO changing root password

This will probably require also a patch, as the password is set for user 'root' automatically and is to be read in the logs (duh !).

We can't initialise the application (and ask for postgres table, and root user to be created, then quit). So we can't do that in the hooks/init script in a reasonable manner.

There is a special ``npm run reset-password`` with odd arguments that can reset root password, only if database already populated.

I need a patch to simply set password from base server configuration.