Sign inSign up

4teamwork/logrotate

By 4teamwork

•Updated almost 8 years ago

Simple docker container to rotate logs.

Image
0

10K+

4teamwork/logrotate repository overview

The following environment variable must be set:

PATH_LOGFILES=/path/to/logfiles/*.log```


> Other environment vars can be set (default values):

CRON_EXPR="30 3 * * *" FREQUENCY="weekly" COUNT_ROTATE="4"


> The container runs with the following logrotate config:

/path/to/logfiles/*.log { weekly missingok compress notifempty copytruncate rotate 4 }



> Example in docker-compose:

containerX: container_name: container_with_logs volumes: - log_vol:/path/to/logfiles logrotate: container_name: logrotate image: 4teamwork/logrotate restart: always volumes: - log_vol:/path/to/logfiles environment: - PATH_LOGFILES=/path/to/logfiles/*.log volumes: log_vol:

Tag summary

Content type

Image

Digest

Size

4.5 MB

Last updated

almost 8 years ago

docker pull 4teamwork/logrotate