-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logrotate to docker container #255
Comments
The log rotation is already configured in the Reference tutorial: https://www.digitalocean.com/community/tutorials/how-to-configure-logging-and-log-rotation-in-nginx-on-an-ubuntu-vps#log-rotation-with-logrotate |
But not installed. |
I got it. So now we can only enter the container and install it. apt update && apt install logrotate |
Ohh stupid, unfortunately it's not that easy since logrotate requires cron, this would also have to be installed. This would only make the image unnecessarily larger, but 0xJacky could trigger it via the internal cron of nginx-ui, I just don't know how time-consuming that would be. PS: it can be executed manually via |
Ok, I plan to add this command into gocron, maybe later this week. |
cool :) but don't forget you still have to install logrotate in the docker image. |
Recommended configuration about postrotate:
|
Hi, If you find any problem about this feature, please reply to this issue, thanks. |
Hello,
I have mounted the logs of nginx via a volume, because crouwdsec has to read them and I can also have a look from time to time even if the docker container is off.
I noticed that my logs have become almost 1GB in size in the meantime.
I think it would be good if the logrotate service is installed in the docker container.
Since nginx already provides the corresponding configs, nothing else needs to be set up.
Greetings
The text was updated successfully, but these errors were encountered: