Repository navigation
fix: Update to Traefik v3, make Let's Encrypt work with Traefik, fixes #6183, for #5940, fixes #4632 - #6317
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
df0a3cb to
bcfe8a8
Compare
stasadev
left a comment
There was a problem hiding this comment.
Looks good to me.
I think we could mention here that nginx-proxy is deprecated:
|
Added more of a deprecation notice and rebased. |
stasadev
left a comment
There was a problem hiding this comment.
This looks great!
I tested the casual hosting feature, everything worked as intended.
| # Router Customization and Debugging (Traefik) | ||
|
|
||
| Traefik is the default router in DDEV v1.22+. | ||
| Traefik is the default router in DDEV v1.22+. The older `nginx-proxy` router is deprecated and will be removed in DDEV v1.24. |
There was a problem hiding this comment.
I think we could have a separate page for such information.
Same as https://goreleaser.com/deprecations/
There was a problem hiding this comment.
The only other things I remember us deprecating are
disable-http2, which goes away with traefiknginx-proxy
I tried for years to deprecate traditional Windows, but always got significant pushback. And now it works really quite well, amazingly.
Let's do as you say when we get this ready for v1.24.
| Traefik provides a dynamic description of its configuration you can visit at `http://localhost:10999`. | ||
| When things seem to be going wrong, run [`ddev poweroff`](../usage/commands.md#poweroff) and then start your project again by running [`ddev start`](../usage/commands.md#start). Examine the router’s logs to see what the Traefik daemon is doing (or failing at) by running `docker logs ddev-router` or `docker logs -f ddev-router`. | ||
|
|
||
| ## Router `docker-compose` Customization |
There was a problem hiding this comment.
I think this section should be moved up higher in this doc - surely before Project Config, and maybe even before Global Config, since it pertains to the construction of the global ddev router?
Also, which file ultimately gets created as a result of this merging of ~/.ddev/router-compose.*.yaml files? ~/.ddev/.router-compose-full.yaml?
And perhaps another example can be provided that does more than just modify environment variables, so as to point out the broader possibilities this might have? I dont have the faintest idea of why I might want to learn about and mess with this.
There was a problem hiding this comment.
This is a very unusual thing to do. I don't agree that it needs more prominence. Can you think of anything to do with it?
There was a problem hiding this comment.
I was just suggesting this so as to put the sections/headings in a sort of logical order - most fundamental/first to be executed -> last to be executed. But feel free to ignore this.
|
|
||
| DDEV uses Traefik by default unless you configure the traditional router by running `ddev poweroff && ddev config global --router=nginx-proxy`. | ||
| DDEV uses Traefik by default unless you configure the (deprecated) `nginx-proxy` router by running `ddev poweroff && ddev config global --router=nginx-proxy`. | ||
|
|
There was a problem hiding this comment.
I think it would be beneficial to briefly point out up-front what each configuration does.
It should be made clear that ~/.ddev/router-compose.*.yaml files merge to generate ~/.ddev/.router-compose-full.yaml, which is then used by docker compose to create the ddev-router container.
This traefik doc seems more pertinent to our doc than the main traefik docs landing page. https://doc.traefik.io/traefik/getting-started/configuration-overview/
static_config.yaml then gets read once by traefik while starting up to define the global configuration, and requires a full restart if you modify it.
<project>.yaml then defines each project.
There was a problem hiding this comment.
Does this have to do with the line you put the comment on, or is it just a general comment?
There was a problem hiding this comment.
General comment aimed around that introductory part of the doc. I didnt seem able to add a comment below it
There was a problem hiding this comment.
I'll try to improve the intro to each section.
| entrypoints: | ||
| - http-{{$s.ExternalPort}} | ||
| {{ end }} | ||
| {{ end }}{{ end }} |
There was a problem hiding this comment.
should probably put the middleware placeholder here for the 443 and 8026 ports
# middlewares:
# - "redirectHttps"
There was a problem hiding this comment.
Why would we redirect for 443 or 8026?
There was a problem hiding this comment.
haha, i didnt even pay attention to it being redirecthttps. I just noticed that the middleware: heading was missing, as I had to add it for my own middleware plugins
Perhaps just add middleware: without being commented-out (unless it fails when you have a heading without any middleware configured), so that its clear where to add our own
There was a problem hiding this comment.
I guess my assumption is that this is pretty rare, and that somebody who has gotten this far will understand what they might be able to do with middlewares
|
Everything seems to be working well for me - my traefik middleware plugins work, etc... HOWEVER, I cant seem to use |
|
Wow, can't believe we don't have tests for additional_hostnames, etc. Great catch, will take a look @nickchomey |
|
@nickchomey could you please give more details about how to recreate the failure you saw with additional_hostnames and additional_fqdns? How was it manifested? Where did you make changes? Was this after a I have this situation: and all of the URLs work, I don't see errors in the traefik dashboard... (But if there were errors, they should have broken
Recreate with Please use a trivial project or unmodified project to recreate. Did you perhaps do this? That's certainly not supported, if that's what you did I don't know if it's reasonable to try to error-check it. |
Co-authored-by: nickchomey <[email protected]>
Co-authored-by: Stanislav Zhuk <[email protected]>
|
Rebased and pushed updated traefik router. If things are OK in the morning will pull and then we can work Nick's PR to this one. |


The Issue
How This PR Solves The Issue
TODO
use_letsencryptwe have to delete the default certsentryPointshas to be managed elsewhere and merged into it.Followups
Manual Testing Instructions
Start by pulling latest traefik image:
docker pull ddev/ddev-traefik-router:20240616_traefik_3General Usage
ddev get ddev/ddev-solrand see that solr UI works right.Inspect the created configuration files
ddev restartand verify it works (have to remove #ddev-generated). Don't forget to remove the file then so it will be recreated.Try out casual hosting with this PR
Try out dnsChallenge docs with traefik (this worked for me, but may not be useful to pursue. It does require extra capabilities and permissions on the DNS setup)
Traefik configuration docs at https://ddev--6317.org.readthedocs.build/en/6317/users/extend/traefik-router/
Casual hosting docs at https://ddev--6317.org.readthedocs.build/en/6317/users/topics/hosting/
Automated Testing Overview
There isn't currently testing for Casual hosting
I think the existing tests will catch problems with traefik v3. I imagine there will be some
Release/Deployment Notes