/var/log/redmine/*.log {
    compress
    dateext
    maxage 90
    rotate 45
    size 2048k
    notifempty
    missingok
    sharedscripts
    su redmine redmine
    create 640 redmine redmine
    # this worked with Unicorn, but Puma can seemingly only reopen stdout redirection and not the "normal" production.log
    # without preload this does a phased restart which also works, but with preload it is not supported
    #postrotate
    # /usr/bin/systemctl kill --kill-who=main --signal=USR1 redmine.service
    #endscript
    # hence use workaround, https://github.com/puma/puma/issues/1962
    copytruncate
}
