Comments (7)
Hello,
swarm is now a dedicated provider:
- https://doc.traefik.io/traefik/routing/providers/swarm/
- https://doc.traefik.io/traefik/migration/v2-to-v3/#docker-docker-swarm
- https://doc.traefik.io/traefik/providers/docker/
In your configuration, you are mixing the 2 providers (Docker and Swarm), if you want to use Swarm only then you should migrate your Docker provider configuration to the Swarm provider.
from traefik.
After another hour of going through the three documents I finally have it working:
command:
- "--log.level=ERROR"
- "--log.filepath=logs/traefik.log"
- "--accesslog.filepath=logs/access.log"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--providers.swarm.network=proxy"
- "--providers.swarm.endpoint=unix:///var/run/docker.sock"
- "--providers.swarm.exposedByDefault=false"
- "--entryPoints.http.address=:80"
- "--entryPoints.https.address=:443"
It would be nice if there would be a basic configuration, step by step and not only snippets here and there. It would be a lot less trial and error and would scare of people a lot less. It took me about half a year to get everything running including TLS with letsencrypt (the letsencrypt part took me several months alone because the link between the entry points and the services is not really documented well, it took me ages to figure out that the only thing I was missing was specifying the correct network, so traefik could route the request to the service.
When you know this, it is obvious but if you don't, you just see 404s every time you try something and you do not get any hint what might be wrong.
Same for this configuration here: the guide to upgrade only specifies to connect to localhost port 2377. In my case this did not work. the docker socket connection worked.
If you do not know where the problem is, you have to try different things which usually messes up the configuration. I found that half of my traefik labels were wrong as I copied them from the examples until traefik sort of worked. At least I was able to sort that out now.
from traefik.
Hello @Twiederh,
Thanks for reaching out.
It would be nice if there would be a basic configuration, step by step and not only snippets here and there.
The idea sounds great, such documentation would help a lot of people I guess.
Do not hesitate to open a PR: Traefik is an Open Source project and any help is appreciated (and, concerning the documentation, it's more than appreciated 😅 ).
from traefik.
I would be happy to help but when trying to submit a PR, I received "must be a collaborator. This is what I entered:
What does this PR do?
For the initial configuration of Traefik there should be basic configuration examples that show completely how to configure Traefik from scratch to get new users up to speed very quickly. The configuration examples should show a complete scenario, from my own experience I see two areas that took me long to figure out the configuration:
- Basic setup with initial configuration items for both yaml and toml files and for environment variables in Docker configuration files
- complete TLS configuration steps end-to-end
Also they should only cover the absolute minimum configuration necessary. The additional documentation then helps the user to find the additional configuration documentation for additional features but then there would be a minimum a new user could get back to knowing that it works
Motivation
I struggled big time trying to get things like TLS working completely, the changes in 3..0 with Docker Swarm again took me hours to get back to a working configuration. There is a lot of documentation but sometimes it would be great if there would be configuration examples that can be used to compare ones own configuration to. For example for TLS and the loadbalancer piece of the configuration I never understood that there needs to be a network connection between Traefik and the container that is configured for TLS. In hindsight, it is obvious but if you do not know where to look and how to troubleshoot, you configure the steps in the documentation and they do not work - and even worse, you do not see why.
More
- Added/updated tests
- Added/updated documentation
Additional Notes
I would be happy to help here, I an "only" running a setup with Docker Swarm but I have at least some configurations that would help others as well - in return maybe someone can remove the unnecessary bits of the configuration to make them cleaner.
from traefik.
Hello @Twiederh,
I received "must be a collaborato
This error happens when people try to push on Traefik repo. Have you forked traefik before opening the PR?
from traefik.
Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.I have to close this one because of its lack of activity 😞Feel free to re-open it or join our Community Forum.
from traefik.
Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.I have to close this one because of its lack of activity 😞Feel free to re-open it or join our Community Forum.
from traefik.
Related Issues (20)
- Traefik does not resolve TLS ingress if termination secret created after ingress HOT 1
- More resiliant approach for in-flight requests on terminating Pods HOT 2
- traefik_open_connections metric drifts down until negative HOT 7
- Service label in traefik_service_server_up metric is not human-readable HOT 2
- 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 1
- 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
- Post-Quantum Key Exchange support for HTTPS HOT 1
- To support HTTP Basic authentication for docker/swarm provider's endpoint
- Environment Variables HOT 3
- Basic Auth Automatically encode Base64 - basicauth.users 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.