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
logrotate openemr container #161
Comments
With any luck, Alpine has a logrotate package -- that /does/ seem sort of essential. If it does, install from apk and submit a logrotate.conf you like? |
hi @jesdynf, the default .conf that is installed looks fine |
So should we install logrotate on the default OpenEMR docker, @bradymiller ? |
hi @stephenwaite and @jesdynf . Doesn't more need to be done than simply installing this? Or will it work on the apache logs automatically after installing logrotate? |
Brady you need to add a file specific to Apache to
/etc/logrotate.d/<apacheFileToCreate>
It’s just default logrotate syntax for that file
Anything you put in there will be run daily, and by default logs rotate
like once every week I think with maybe a week’s backup kept
If you look in that folder btw should see a few other examples to guide you
…On Sun, Jul 28, 2019 at 1:33 AM Brady Miller ***@***.***> wrote:
hi @stephenwaite <https://github.com/stephenwaite> and @jesdynf
<https://github.com/jesdynf> . Doesn't more need to be done than simply
installing this? Or will it work on the apache logs automatically after
installing logrotate?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#161?email_source=notifications&email_token=AAZTUEXOXVKLM6TIAXXN2EDQBU4T7A5CNFSM4GLYTOX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26YNBQ#issuecomment-515737222>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZTUEUQTXAT5C2BGS7VNOLQBU4T7ANCNFSM4GLYTOXQ>
.
|
Also this as discussed
http://httpd.apache.org/docs/current/programs/rotatelogs.html
Simpler 1 liner alternative
…On Sun, Jul 28, 2019 at 1:39 AM Dan Ehrlich ***@***.***> wrote:
Brady you need to add a file specific to Apache to
/etc/logrotate.d/<apacheFileToCreate>
It’s just default logrotate syntax for that file
Anything you put in there will be run daily, and by default logs rotate
like once every week I think with maybe a week’s backup kept
If you look in that folder btw should see a few other examples to guide you
On Sun, Jul 28, 2019 at 1:33 AM Brady Miller ***@***.***>
wrote:
> hi @stephenwaite <https://github.com/stephenwaite> and @jesdynf
> <https://github.com/jesdynf> . Doesn't more need to be done than simply
> installing this? Or will it work on the apache logs automatically after
> installing logrotate?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#161?email_source=notifications&email_token=AAZTUEXOXVKLM6TIAXXN2EDQBU4T7A5CNFSM4GLYTOX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26YNBQ#issuecomment-515737222>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAZTUEUQTXAT5C2BGS7VNOLQBU4T7ANCNFSM4GLYTOXQ>
> .
>
|
pretty sure it works automatically and sanely when you install logrotate |
I think @stephenwaite is right on just needing to install it, since the following script is found after install:
|
and here is default logrotate.conf:
|
the postrotate command from the apache logrotate script does not seem to work on the docker, though, when I try it:
Which I am guessing would end up with bad things happening if that command does not work after a log rotate. |
Also, @danehrlich1 , regarding the simple one liner, please let me know what the one liner would actually be :) |
hmmm, looks like we'll need to |
Issue with openrc:
|
Issue with logrotate after do the following forced run:
Note this zapped all the logs and they now appear to have nowhere to go :)
|
Gonna bump this issue to 5.0.3 goal since 5.0.2 is gonna be released in next couple days hopefully and don't want any last minute bugs getting in :) |
FYI 98c2b5f addresses this but it's not in 6.1.0 yet, I just stuck it in 7.0.0 for now. |
And it's in 6.1.0, will be in production containers next time they're cycled. |
hi @jesdynf , this has probably been discussed before but looking at /var/log/apache2 and these files seem to be growing from day 1
-rw-r--r-- 1 root wheel 886116 Dec 18 23:28 ssl_error.log
-rw-r--r-- 1 root wheel 34341324 Dec 20 03:58 error.log
-rw-r--r-- 1 root wheel 24270142 Dec 21 14:37 access.log
do you have a suggestion on rotating since logrotate isn't installed in the docker?
thanks
The text was updated successfully, but these errors were encountered: