From 2f16ca6b98cdf23a9cae7d2e7d43a1c1c88dc0a7 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 18 Aug 2023 18:10:37 +0200 Subject: [PATCH] Move traefik log into external mount point --- roles/traefik/templates/config/traefik.yml.j2 | 8 +++++--- roles/traefik/templates/docker-compose.yml.j2 | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/traefik/templates/config/traefik.yml.j2 b/roles/traefik/templates/config/traefik.yml.j2 index fadd266..f08a4d3 100644 --- a/roles/traefik/templates/config/traefik.yml.j2 +++ b/roles/traefik/templates/config/traefik.yml.j2 @@ -1,9 +1,11 @@ -log: - level: DEBUG - api: dashboard: true +log: + filePath: "/var/log/traefik/traefik.log" + format: json + level: INFO + accessLog: filePath: "/var/log/traefik/access.log" format: json diff --git a/roles/traefik/templates/docker-compose.yml.j2 b/roles/traefik/templates/docker-compose.yml.j2 index 2f16525..9cdbc92 100644 --- a/roles/traefik/templates/docker-compose.yml.j2 +++ b/roles/traefik/templates/docker-compose.yml.j2 @@ -18,6 +18,7 @@ services: - ./config/traefik.yml:/traefik.yml:ro - {{ server.work_dir }}/traefik/base/acme.json:/acme.json:rw - {{ server.work_dir }}/traefik/base/access.log:/var/log/traefik/access.log:rw + - {{ server.work_dir }}/traefik/base/traefik.log:/var/log/traefik/traefik.log:rw - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro extra_hosts: