Skip to content

feat: keep local Traefik config in untracked traefik/dynamic.d - #157

Open
yepzdk wants to merge 2 commits into
developfrom
feature/traefik-local-dynamic-config
Open

yepzdk wants to merge 2 commits into
developfrom
feature/traefik-local-dynamic-config

Conversation

@yepzdk

@yepzdk yepzdk commented Oct 15, 2026

Copy link
Copy Markdown

Tools such as Agent Proxy write API keys into Traefik's dynamic config. The only place for local config was the tracked traefik/dynamic-conf.yaml, so a git commit -a would publish those keys to this public repository.

traefik/dynamic.d/ is now Traefik's /config and ignored by git. The shared dynamic-conf.yaml is mounted into it at the same container path, so it loads and live-reloads as before. Local services go in dynamic.d/, one file each.

The local directory has to be /config itself: Traefik's file provider reads subdirectories but only watches top-level files, so a /config/local mount would not reload. dynamic.d/dynamic-conf.yaml is an empty placeholder Docker needs as the mount point while /config is read-only.

Existing setups keep working after itkdev-docker-compose traefik:start. Services already added to dynamic-conf.yaml should be moved to dynamic.d/, not copied: Traefik drops a router or middleware defined twice with different content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant