This can be as simple as automatically creating a logrotate file:
https://blog.birkhoff.me/devops-truncate-docker-container-logs-periodically-to-free-up-server-disk-space/
And having this enabled/disabled via a global environment variable (DOKKU_LOGROTATE). If there is no value set, it is implied true. If it has a value of false, we delete the file. If it is set to true, we create the file. The value can be set via logs:set, and is output to logs:report.
On install of dokku, we'll set this value if it is not set.
Hmmm maybe instead of making it togglable, I'll just set it as default.
Would dokku be subject to the default settings described here?
https://docs.docker.com/config/containers/logging/local/
i.e. 100MB per container (20MB max-size * 5 files)
Yep, we are just a - very! - thin docker wrapper. Any default settings you've set on the daemon will apply (in addition to custom docker-options).
Most helpful comment
Hmmm maybe instead of making it togglable, I'll just set it as default.