Skip to content
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

Compression doesn't seem to work using docker-compose #29

Open
janhollez opened this issue Aug 30, 2018 · 1 comment
Open

Compression doesn't seem to work using docker-compose #29

janhollez opened this issue Aug 30, 2018 · 1 comment

Comments

@janhollez
Copy link

I'm using this in my docker-compose.yml:

 logrotate:                                                                                                                                                        
    image: "blacklabelops/logrotate"                                                                                                                                
    volumes:                                                                                                                                                        
      - /var/lib/docker/containers:/var/lib/docker/containers                                                                                                       
    environment:                                                                                                                                                    
      - LOGS_DIRECTORIES=/var/lib/docker/containers                                                                                                                 
      - LOGROTATE_INTERVAL=hourly                                                                                                                                   
      - LOGROTATE_COPIES=7                                                                                                                                          
      - LOGROTATE_SIZE=10M                                                                                                                                          
      - LOGROTATE_COMPRESSION=compress    

I don't see any compression when it rotates.
The logs were also much bigger when I first ran it and it didn't split it up in files of max 10M size, it just moved the old file to .1

@nodeplusplus
Copy link

nodeplusplus commented Mar 8, 2020

Did you setup LOGROTATE_INTERVAL or LOGROTATE_CRONSCHEDULE. By default logrotate will only do compgres, copy, ... ONCE at middle night.
If you want logrotate act more frequently, please set up LOGROTATE_INTERVAL=hourly (every hour) or LOGROTATE_CRONSCHEDULE=0 */30 * * * * (every 30mins)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants