integrating vegardit/traefik-logrotate#740
Conversation
|
Hi! Thanks so much for taking the time to put this together. I dont think we want to include by default an extra container right now. I think there was also basic log rotation added in #736. Feel free to reopen and let me know your thoughts. I think this might be best as a docs page explaining how to add it if it really is doing something different enough to #736. |
|
Hey @oschwartz10612 , The PR #736 was intended to support log rotation and necessary configuration for Traefik. As outlined in Traefik's documentation, log rotation still requires an external program to manage the actual rotation: "Traefik will close and reopen its log files, assuming they're configured, on receipt of a USR1 signal. This allows the logs to be rotated and processed by an external program, such as logrotate." The reasoning and context are described in issue #693, which is why I preferred a Dockerized approach over modifying and running external programs on the host. Let me know your thoughts! Edit: I can't reopen it without creating another PR, so I'll just wait for your answer. |
|
This can be achieved by simply creating a simple log-rotation file in /etc/logrotate.d/ - like the below - Adding one more container is not something I would personally like just for this. |
|
Of course, but in cases, where you aren't able or don't want to edit the host system, more secure and compatible approach is the dockerized way. Also "logrotate" is not installed in every distribution... |
|
Ahh okay thanks for clarifying I was not aware of this I apologize. @miloschwartz what do you think? Not sure if we want this extra container always distributed or not in every install? I am tempted to suggest we make this a docs page? |
|
Hey sorry I have not given this the attention it deserves. @TuncTaylan what if we update the installer to include the logrotate when installing crowdsec and otherwise make sure the access log is turned off? |
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Integrating a dockerized solution for traefik log rotation using vegardit/traefik-logrotate.
How to test?
Just start the stack, it'll rotate the traefik logs.