How can you assign the site's baseUrl dynamically? #12115
Replies: 3 comments
-
I am not sure if I understand your question, However each instance is isolated and you provide site base url when you set up the site |
Beta Was this translation helpful? Give feedback.
-
You can 3 or more tenant per website, each one target a specific environment, say |
Beta Was this translation helpful? Give feedback.
-
I have the same question. The use case is I want to take a copy of my production database and copy it to a test or staging environment. We do this a lot with Azure App Service. Our typical App Service configuration has two slots, one for production and one for staging. As part of our deployment to the staging slot we often drop the DBs used by the staging slot and make new copies of the DBs used by the prod slot. That means the staging slot now has the prod base URL. So what I'd really like is for the base URL to be configurable with IShellConfigation so I can make it a slot variable. As an added bonus, it would be nice if the site name could be a slot variable as well. One workaround I've considered is providing a custom implementation of ISiteService, which would look fairly similar to the Orchard Core SiteService except it would overrwrite the ISite.BaseUrl property using IShellConfiguration. But I'm a little nervous doing that with the ISiteService.GetSiteSettingsAsync method since the object it returns is supposed to be immutable. I suspect I might cause unforeseen issues if I'm modifying the document like that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
In Configuration under Settings > General, I was wondering how to you assign Base Url with a dynamic value (for the case you have multiple staging environments).
Beta Was this translation helpful? Give feedback.
All reactions