keymetrics / pm2-logrotate

Automatically rotate all applications logs managed by PM2
1.24k stars 139 forks source link

Running logrotate in docker container with pm2-runtime #104

Open linker-err0r opened 6 years ago

linker-err0r commented 6 years ago

Is there any difference running pm2-runtime in a docker container that might affect logrotate?

For example, here is my dockerfile:


# Build and then run...
RUN npm install
RUN pm2 install pm2-logrotate@2.2.0

CMD [ "pm2-runtime", "start", "ecosystem.config.json"]

Using this setup, I'm not seeing any log rotation happening in the pm2 logs found at $HOME/.pm2/logs. Is there something else I'm missing?

damianobarbati commented 5 years ago

Any news on this? How to logrotate and set log max size in pm2.config.js?

soulmachine commented 3 years ago

bump

Gantulga-kh commented 2 years ago

Should I stop using pm2-runtime? Any solution for the log rotation?

Johann-S commented 4 months ago

it seems by default logs are disabled in pm2-runtime see: https://pm2.keymetrics.io/docs/usage/docker-pm2-nodejs/#pm2-runtime-helper