How do I enable log rotation for log files e.g. access.log.
Is this built in ?
Docs only say "This allows the logs to be rotated and processed by an external program, such as logrotate"
How do I enable log rotation for log files e.g. access.log.
Is this built in ?
Docs only say "This allows the logs to be rotated and processed by an external program, such as logrotate"
https://docs.traefik.io/v1.6/configuration/logs/#log-rotation
If you are running Traefik in a Docker container then you can do something like this:
Check that logrotate is installed
Create file in /etc/logrotate.d/
Put the following script, do not forget to fill with the container name.
Run!
It seems like theres no logrotation built-in so i enabled logration on the Host that the access.log is mounted to.
My logrotate-config for traefik 1.7.4 running in a container with volume mount to "/opt/traefik/logs":