gitpod
gitpod copied to clipboard
Multiple hosts for one GitPod
Is your feature request related to a problem? Please describe
We have multitenant web application where every tenant has own subdomain. Every tenant has own customizations.
Currently in development environment domains looks like this:
- tenant-a.localhost:3000
- tenant-b.localhost:3000
- etc ...
Describe the behaviour you'd like
The ability to utilize multiple hosts within one GitPod environment. Or ability to prepend prefix to host. Or resolving any subdomain of exposed host.
Describe alternatives you've considered
I don't know about any other alternatives.
Additional context
couldn't you use traefik as a reverse proxy to manage this ?
Run traefik as a docker container inside the gitpod workspace
couldn't you use traefik as a reverse proxy to manage this ?
Run traefik as a docker container inside the gitpod workspace
I'm not sure, how can it help me with this situation. Can you please more elaborate this approach?
one thought is to use it to rewrite the url / host
so, you would call localhost/tenant-a
and traefix would intercept the request and take the url and rewrite it to remove the domain path and change the host header to "tenant-a.localhost" before sending the request to localhost:3000
one thought is to use it to rewrite the url / host
so, you would call
localhost/tenant-a
and traefix would intercept the request and take the url and rewrite it to remove the domain path and change the host header to "tenant-a.localhost" before sending the request to localhost:3000
The webserver accepts requests and resolves current tenant by host name.
which is why the "hostname" is set by traefik
I'm sure there are several other options you could try https://doc.traefik.io/traefik/routing/routers/ if you want to try and consider this approach. Just trying to make some suggestions so that you can get things done now instead of waiting for gitpod to add this functionality - if they even do.
I learned the docs of traefik and it looks like, it's possible use only for publicly visible services. In our case, we have self-hosted gitpod in our private network.
Still I believe, the serving content from subdomain(s) is widely used practice which will be useful for many other scenarios.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.