Replies: 1 comment 3 replies
-
Hi @lpeabody, Let me share my thoughts:
Remove the
There is an option But unfortunately, dynamic subdomains based on the main domain are not supported, see issue: So something like this: additional_hostnames:
- docs.$DDEV_PROJECT will not work. Or maybe I misunderstood, and you can do something similar in a single project instance: additional_hostnames:
- primary-domain
- docs.primary-domain
- secondary-domain
- docs.secondary-domain
- ...
Use
Communicating between projects https://ddev.readthedocs.io/en/latest/users/usage/faq/#can-different-projects-communicate-with-each-other |
Beta Was this translation helpful? Give feedback.
-
I don't understand well enough the mechanism used to calculate the services and routers that Traefik uses to direct requests to containers. Hopefully y'all can help me sort that out.
Hard requirements:
docs-primary-domain
.We have a React app that we run and should be able to access through the DDEV site's default domain (generated based on the project directory name). The React app runs on port 3000, so,
https://primary-domain.ddev.site
should bring up the React app when its running.We also have a static documentation site that should be accessible at
https://docs-primary-domain.ddev.site
.Both off these sites are currently served through the
web
service.Typically the way I would do this with Traefik would be something like:
So, this would serve the documentation site through
https://docs-DDEV_HOSTNAME
, and the react application throughhttps://DDEV_HOSTNAME
.In this way, I'd be able to access the docs site web server service and the react application service from every instance of my project running locally, with DDEV_HOSTNAME calculated dynamically based on the project directory.
However, given DDEV's implementation of the Traefik router, it's completely unclear to me how to accomplish something similar using a hardcoded file configuration. It might be and I just don't know what the algorithm is that produces that file (I checked to see if it's well documented but I so far haven't read anything that would indicate how to do this).
Does anyone have any pointers? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions