Created
June 9, 2018 04:51
-
-
Save jwhiting/f703d093a7d8b4fbb3b688139ac08ac6 to your computer and use it in GitHub Desktop.
truncating multi-container docker logs on elastic beanstalk
This file contains hidden or 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
# this would go in, for instance, .ebextensions/truncate_logs.config | |
files: | |
"/etc/cron.d/truncate_logs": | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
*/5 * * * * root truncate -s 0 /var/lib/docker/containers/*/*-json.log | |
*/5 * * * * root rm -f /var/log/containers/rotated/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment