-
-
Notifications
You must be signed in to change notification settings - Fork 469
fix: Configured Apache log rotation in docker deployment scenario #11782
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
Conversation
Signed-off-by: Jagjeevan <[email protected]>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11782 +/- ##
==========================================
+ Coverage 49.88% 50.05% +0.16%
==========================================
Files 83 84 +1
Lines 22984 23110 +126
Branches 5508 5531 +23
==========================================
+ Hits 11466 11568 +102
- Misses 10121 10125 +4
- Partials 1397 1417 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is not used in docker. It's for production only (proxmox containers).
It's not *.log but *log on purpose and it have to work for all flavors.
So never touch this for docker.
RUN echo "0 0 * * * /usr/sbin/logrotate /etc/logrotate.conf" > /etc/cron.d/logrotate && \ | ||
chmod 0644 /etc/cron.d/logrotate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work as there is no cron daemon in docker containers (and that's better)
That's why I was expecting either to use an external cron (on docker staging VM) or to have Apache rotate it's log by itself (this is a capability found in some logging framework, I don't know if it's the case for apache2.
The first option means you might not be able to resolve this issue, but in the -infrastructure repository, and with a manual deployment.
@JagjeevanAK I'm closing this PR as I think there is no good way to do this here. |
100% you are correct I was about to say this thing but forgot to mention on this PR. |
Signed-off-by: Jagjeevan Kashid [email protected]
What
Implemented a log-rotation according to described solution by @alexgarel in the issue
I would suggest maintainer to change the config file of logrotate according to there need current setting keep 14 rotated logs (i.e., 2 weeks) and other things.
Related issue(s) and discussion