I set it to debug at somepoint and forgot maybe? Idk, but why the heck does the default config of the official Docker is to keep all logs, forever, in a single file woth no rotation?
Feels like 101 of log files. Anyway, this explains why my storage recipt grew slowly but unexpectedly.
You should always setup logrotate. Yes the good old Linux logrotate…
We should each not have to configure log rotation for every individual service. That would require identify what and how it logs data in the first place, then implementing a logrotate config. Services should include a reasonable default in logrotate.d as part of their install package.
Ideally yes, but I’ve had to do this regularly for many services developed both in-house and out of house.
Solve problems, and maybe share your work if you like, I think we all appreciate it.
101 of log files
is to configure it yourself
Everything I hear about Nextcloud scares me away from messing with it.
Imho it’s because docker does away with (abstracts?) many years of sane system administration principles (like managing logfile rotations) that you are used to when you deploy bare metal on a Debian box. It’s a brave new world.
It’s because with docker you don’t need to do log files. Logging should be to stdout, and you let the host, orchestration framework, or whoever is running the container so logs however they want to. The container should not be writing log files in the first place, containers should be immutable except for core application logic.
Or you can use Podman, which integrates nicely with Systemd and also utilizes all the regular system means to deal with log files and so on.
Feels like blaming others for not paying attention.
Persistent storage should never be used for logging in docker. Nextcloud is one of the worst offenders of breaking docker conventions I’ve found, this is just one of the many ways they prove they don’t understand docker.
Logs should simply be logged to stdout, which will be read by docker or by a logging framework. There should never be “log files” for a container, as it should be immutable, with persistent volumes only being used for configuration or application state.