getmeli / meli

Platform for deploying static sites and frontend applications easily. Automatic SSL, deploy previews, reverse proxy, and more.
Other
2.4k stars 97 forks source link

Branch URLs under same subdomain as main URL #233

Open yeahsid opened 3 years ago

yeahsid commented 3 years ago

Currently, branches are created as a subdomain to the main website [website.meli.com , latest.website.meli.com]. Adding support for branch URLs like latest-website.meli.com will allow the use of a single wildcard subdomain instead of adding new ones for every project.

gempain commented 3 years ago

@itsezsid thanks for suggesting this ! It was actually on our backlog but I need to move some issues from our Trello to Github. I'd love to this see this in the coming releases, it's a really annoying limitation. When we started Meli, we thought this made sense, but we'll be moving branch domains up one level. The only thing I'm worried about is how we're going to prevent collisions (someone naming a site latest-mysite would cause conflicts with someone shipping branch latest on site mysite).

gempain commented 3 years ago

@pimartin suggested to avoid conflicts we use a special character (e.g. - or _) and we prevent its use in site names. This way it'll be impossible to have collisions.

yeahsid commented 3 years ago

Ah okay, that would make a lot of sense.

mtiller commented 2 years ago

I wanted to mention here (and relevant for #238 as well) that I'm running Meli using a Kubernetes Helm chart and I've found a workaround for this issue. It is a mildly annoying, but not that bad. Basically, I have an option to list in my values.yaml file all the subdomains that Meli is aware of (i.e., list all the sites). When I do this, the Ingress template creates not only all the necessary wildcard routes but it also requests (via cert-manager in my case) all the wildcard SSL certificates. So as long as I list all my sites in my values.yaml file, I can use the branching features just fine.