lando / platformsh

The Official Platform.sh Lando Plugin
https://docs.lando.dev/platformsh
GNU General Public License v3.0
6 stars 4 forks source link

platform.sh integration, map all domains to local urls #73

Open gilzow opened 3 years ago

gilzow commented 3 years ago

Please explain your request and its importance in the form of a user story. As a wordpress developer who works with WordPress multidomain multisites that contain numerous domains, I want the ability to have the attached domains on a platform project mapped to local *.lndo.site URLs.

Please provide some detail on how lando can help solve this problem When a project uses a platform recipe and the ./.platform/routes.yaml contains the route

"https://{all}/":
    type: upstream
    upstream: "app:http"

Map each domain attached to the project to a local .lndo.site URL.

Is your feature request related to a problem? Please describe. Related to, or at least discovered by lando/platformsh#65

Describe the solution you'd like

❯ platform domains --columns=name
Domains on the project multisite-multidomain (6ienq4p4y6ita):
+---------------------------+
| Name                      |
+---------------------------+
| wpmultidomain.plat.farm   |
| wpmultidomain2.friday.dev |
+---------------------------+
❯ lando start
<snip>
 NAME      multisite-multidomain                                  
 LOCATION  /Users/gilzow/Documents/projects/multisite-multidomain 
 SERVICES  app, db                                                
 APP URLS  http://localhost:63534                                 
           http://wpmultidomain.plat.farm.lndo.site:8000/         
           https://wpmultidomain.plat.farm.lndo.site/             
           http://wpmultidomain2.friday.dev.lndo.site:8000/       
           https://wpmultidomain2.friday.dev.lndo.site/   

Describe alternatives you've considered For now I'm adding the following to my lando.yml file:

proxy:
  app:
    - wpmultidomain.plat.farm.lndo.site
    - wpmultidomain2.friday.dev.lndo.site

But this requires I keep the domains in-sync manually between my platform project and lando.

magtak commented 3 years ago

I am also stuck on this, working with Drupal. I want to have .lndo.site domains locally but they don't get generated if my route is https://{all}/

Is there any specific format for .platform/routes.yaml so that multiple production domains can be supported (both on www and apex) and local *.lndo.site local domains work as expected?

gilzow commented 3 years ago

I am also stuck on this, working with Drupal. I want to have .lndo.site domains locally but they don't get generated if my route is https://{all}/

Is there any specific format for .platform/routes.yaml so that multiple production domains can be supported (both on www and apex) and local *.lndo.site local domains work as expected?

I'm currently working on an update to the platform recipe that will allow for this, but it's not quite ready. In the meantime, and while not quite as elegant, you could set up proxy urls in your .lando.yaml file to route to your main web service.

magtak commented 2 years ago

@gilzow yeah, that's what I did based on your initial comment. Thank you.