meta data for this page
Logging
Prevent disc space flooding with container logs:
- /etc/logrotate.d/docker-container
/var/lib/docker/containers/*/*.log { rotate 4 weekly compress size=100M missingok delaycompress copytruncate }
nginx logs
- /etc/logrotate.d/docker-nginx
/srv/nginx/logs/*.log { weekly missingok rotate 4 dateext compress delaycompress notifempty sharedscripts postrotate cd /root/dockers/nginx \ && /usr/local/bin/docker-compose kill -s USR1 nginx endscript }