Hello,
I’m trying to set up Traefik with Crowdsec which need the Traefik logs to work, but unfortunately I can’t seem to do it in the correct way. I’ve have to admit that this is not my forte, to put it bluntly I’m a noob. I’m using Unraid with docker containers so no docker compose. My installation of Traefik is based on Ibracorps instruction and is since Monday updated to the latest version and Traefik appears to more or less run as a clock (I have a warning in the logs that I’ll try to fix when I’m done with this). I also looked at Ibracorps old clip for Crowdsec and Jims garage which is for the updated version of Traefik and his Crowdsec installation to find some guidance.
In the Ibracorp.ios docs for the Traefik installation they define the logs like this:
log:
level: INFO
format: json
accessLog:
format: json
So I copied Jims Garage:
log:
level: "INFO"
filePath: "/var/log/traefik/traefik.log"
accessLog:
filePath: "/var/log/traefik/access.log"
I first created a path in Traefiks container like this:
Name: Logs
Container Path: /logs
Host Path: /var/log/traefik/ (and yes there is a folder named traefik in /var/log/)
Which do not result in any logs in the container folder.
When I’m instead do it like this:
Name: Logs
Container Path: /logs
Host Path: /mnt/user/appdata/traefik/logs
And change accordingly in the traefik.yaml
log:
level: "INFO"
filePath: ”/logs/traefik.log"
accessLog:
filePath: "/logs/access.log"
It produces logs in the correct folder, but the link to the logs in the Unraid container no longer produces any logs.
So I get feeling that I kind of can make it work, but it is the incorrect way of doing it. There is something I’m missing and I hope you understand what is wrong and can give me some guidance…
Best regards
