I am using log rotate with the following configuration:
sudo vi /etc/logrotate.d/storagenodes
/mnt/WD1003/logs/*.log
{
weekly
missingok
rotate 4
copytruncate
compress
notifempty
}
sudo logrotate -vf /etc/logrotate.d/
Plus the docker run command with the following parameters:
…
--log-opt max-size=1g \
--log-opt max-file=5 \
…
--mount type=bind,source="/mnt/WD1003/logs",destination=/app/logs \
…