2

While using azure appservice deployment slots the urls for the sites (which ever has the slot) change and on swap it should not get swapped. In Sitecore commerce - we have Y.Commerce.Engine we have url to shops and ops hardcoded

<commerceEngineConfiguration type="Sitecore.Commerce.Engine.Connect.CommerceEngineConfiguration, Sitecore.Commerce.Engine.Connect"> <shopsServiceUrl>https://commerceauthoring.sc.com/api/</shopsServiceUrl>
</commerceEngineConfiguration>

The url should remain same upon swap. We have defined rule on the azure configuration as in below . based on this config I should be able to change the url dynalically with patch config. How can we achieve this? How the Patch config will look like? screenshot

5
  • need more info.. You want the commerce engine url to be same on deployment slot and main slot? It should be automatic if you have role based configs. Commented Jun 3, 2020 at 15:44
  • Hi Kautilya, I need 2 different urls for shop and also we have commerce engine specific to slot. ex: for staging: the <shopsServiceUrl> should be commerceauthoring.sc.com-staging/api and for Production it should be commerceauthoring.sc.com/api without staging keyword.
    – Jyoti
    Commented Jun 3, 2020 at 16:54
  • so u need slot specific configs. You can do that by adding a new config setting called "Slot", add it in the web.config just like role and then reference it in the sitecore config files just like role. I hope your web.config is not overwritten by deployments. Commented Jun 3, 2020 at 18:49
  • web.config is not part of deployment. But when you do swap of slots in azure everything (including configs) will be swaped- for more info on what exactly happen on swap please go through the link: learnwithshahriar.wordpress.com/2015/08/05/…
    – Jyoti
    Commented Jun 4, 2020 at 16:48
  • @sc.kautilya- I understand what you said about slot specific configuration. But does that apply to Json files as well? My requirement is for .json file.
    – Jyoti
    Commented Feb 11, 2021 at 10:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.