Comments (4)
Hello @WPF0414 ,
Thanks for your interest in Traefik.
The error you've encountered is due to the file provider interpreting {{.ContainerName}}
as a Go template and attempting to populate it.
I recommend splitting your static and dynamic configurations into dedicated files, this should resolve the issue you're facing.
Feel free to leave a new comment if you continue to experience any issues.
from traefik.
@lbenguigui thanks!How do I deal with it? I'm currently using lable:traefik. http. routers. xxx. Rule is processed in the form of providers. Docker. defaultrule deleted, but I could have used it in the command in docker-compose before.
from traefik.
Hello @WPF0414 ,
If you want to split static & dynamic configuration that coming from your file provider, I suggest you to replace :
...
providers:
providersThrottleDuration: 2s
docker:
watch: true
network: traefik
defaultrule: Host(`{{ .ContainerName }}.xxxx.com`)
endpoint: unix:///var/run/docker.sock
file:
watch: true
directory: /etc/traefik
...
by :
...
providers:
providersThrottleDuration: 2s
docker:
watch: true
network: traefik
defaultrule: Host(`{{ .ContainerName }}.xxxx.com`)
endpoint: unix:///var/run/docker.sock
file:
watch: true
filename: /etc/traefik/my_dedicated_file.yaml #or directory: /etc/traefik/my_dedicated_directory
...
And set all the dynamic configuration related to the file provider in the dedicated file (or directory).
from traefik.
I have used the docker label to solve this problem, thank you very much!
from traefik.
Related Issues (20)
- Service label in traefik_service_server_up metric is not human-readable HOT 4
- filter query params from logs HOT 1
- Dual Logging paths HOT 1
- rate limit middleware to support long latency requests HOT 1
- Log files not persisted on container restart HOT 2
- Cannot load rules / directives from config files HOT 9
- Can't upload docker images larger than 2GB via traefik 3.0 proxy HOT 8
- The final response code of my api service when using traefik error middleware is of main service ? - error service ? HOT 1
- provider=swarm - Gateway time-out Error code 504 HOT 1
- Kubernetes Ingress With Wildcard Host Doesn't Cover Hosts With Undescores (_) HOT 1
- Traefik V3 break on TCP Routers filter HOT 1
- Limit connections by a single IP address. HOT 5
- Support loading certificates from Cert-Manager HOT 1
- Post-Quantum Key Exchange support for HTTPS HOT 3
- To support HTTP Basic authentication for docker/swarm provider's endpoint HOT 1
- Environment Variables HOT 3
- Basic Auth Automatically encode Base64 - basicauth.users HOT 2
- Body truncation issue in traffic plugin under certain conditions HOT 1
- A Router rule that exactly match all same-name header values. HOT 3
- Extend `headerLabels` Support to All Prometheus Metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traefik.