@regis
You mention in this comment Docker container logs fill up disk space on production servers · Issue #1014 · overhangio/tutor · GitHub that you would recommend configuring the Docker daemon logging configuration for setting up log rotations. I think this may be the straightforward approach to handling container log configuration that even falls outside of the typical tutor local deployment. Setting the Docker daemon logging configuration is most likely what we’ll end up doing for our site.
Docker Container Logging Configuration
Here are some things that I noticed though after reading over Docker documentation here Services top-level elements | Docker Docs. We do have the ability to set the docker-compose service logging element to define overrides. I believe that the container logging configuration would take precedence over the Docker daemon for logging.
Would it be better to utilize docker-compose service configuration to include this logging configuration rather than setting Docker daemon logging configuration? I honestly don’t mind setting the Docker daemon logging configuration file because it is a single change versus having to handle this on a container-level.
Update: After reading this article I think that Docker container logging configuration would be useful if you were utilizing different logging configuration per service rather than the Docker logging default drivers for all containers. This article explains all that Docker Compose Logs: Best Practices & Expert Troubleshooting Guide | Squadcast. Because we are not at the moment going to set up different logging drivers, setting the Docker daemon would make more sense to configure.
