Expose max log retention in traefik.yml #51

Merged
marlon merged 1 commits from sixsmith/traefik:master into master 2025-02-19 22:15:04 +00:00
3 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ LETS_ENCRYPT_EMAIL=certs@example.com
# DASHBOARD_ENABLED=true
# WARN, INFO etc.
LOG_LEVEL=WARN
LOG_MAX_AGE=1
Review

This has no default set for new operators. So, if they miss adding this to their .env file, they are passing an empty value into the config which might have weird effects. A common approach is to thread a default in on the compose.yml env stanza ala https://git.coopcloud.tech/coop-cloud/gitea/pulls/42/files#diff-31039bcded788fa49a167378a8b1ee509c366f91

This has no default set for new operators. So, if they miss adding this to their `.env` file, they are passing an empty value into the config which might have weird effects. A common approach is to thread a default in on the `compose.yml` `env` stanza ala https://git.coopcloud.tech/coop-cloud/gitea/pulls/42/files#diff-31039bcded788fa49a167378a8b1ee509c366f91
# This is here so later lines can extend it; you likely don't wanna edit
COMPOSE_FILE="compose.yml"

View File

@ -27,6 +27,7 @@ services:
environment:
- DASHBOARD_ENABLED
- LOG_LEVEL
- LOG_MAX_AGE
healthcheck:
test: ["CMD", "traefik", "healthcheck"]
interval: 30s

View File

@ -1,6 +1,8 @@
---
Review

You also need to bump the version of the config or all upgrades will fail:

https://git.coopcloud.tech/coop-cloud/traefik/src/branch/master/abra.sh#L1

You also need to bump the version of the config or all upgrades will fail: https://git.coopcloud.tech/coop-cloud/traefik/src/branch/master/abra.sh#L1
log:
level: {{ env "LOG_LEVEL" }}
maxAge: {{ env "LOG_MAX_AGE" }}
providers:
docker: