Skip to content

Add logrotate for pm2 #15

Description

@pajtai

PM2 has a logrotate module, but Ubuntu also has logrotate installed by default.

As part of the pm2 task the following script should be added to /etc/logrotate.d/pm2-user

/home/ubuntu/.pm2/pm2.log /home/ubuntu/.pm2/logs/*.log {
        rotate 12
        weekly
        missingok
        notifempty
        compress
        delaycompress
        create 0640 ubuntu ubuntu
}
  • There is an option to bypass the task (for example if you want to use different log rotate params)

(can template the ssh user)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions