Created
January 2, 2018 17:34
-
-
Save almoraes/47a02e2832129dc8c5ffebac045774f8 to your computer and use it in GitHub Desktop.
EB AWS rotate docker logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
"/etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.dockerlogs.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
/var/lib/docker/containers/*/*.log { | |
size 100M | |
rotate 14 | |
missingok | |
compress | |
notifempty | |
copytruncate | |
dateext | |
dateformat %s | |
} | |
"/etc/cron.hourly/cron.logrotate.elasticbeanstalk.dockerlogs.conf": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/bin/sh | |
test -x /usr/sbin/logrotate || exit 0 | |
/usr/sbin/logrotate /etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.dockerlogs.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment