Skip to content

Instantly share code, notes, and snippets.

@u007
Created January 25, 2019 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u007/154efb645f99aa5998a4f1424c29f386 to your computer and use it in GitHub Desktop.
Save u007/154efb645f99aa5998a4f1424c29f386 to your computer and use it in GitHub Desktop.
docker-compose for logrotate
version: "3.2"
services:
logrotate:
image: blacklabelops/logrotate
restart: unless-stopped
volumes:
- "/home/yourpathtolog:/log"
- "./logrotate-status:/logrotate-status"
environment:
- "LOGS_DIRECTORIES=/log"
- "LOGROTATE_INTERVAL=hourly"
- "LOGROTATE_COPIES=10"
- "LOGROTATE_SIZE=100M"
- "LOGROTATE_COMPRESSION=compress"
- "LOGROTATE_STATUSFILE=/logrotate-status/logrotate.status"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment