Publish the Commerce Engine
Publishing represents activities associated with building and packaging the Sitecore Commerce Engine, with partner and customer extensions, into a package which can be deployed using any form supported by ASP.NET Core. There are multiple ways to publish the Sitecore Commerce Engine.
To publish to IIS, use the following instructions:
-
Configure IIS.
-
Install .NET Core Windows Server Hosting bundle.
-
Configure the applications.
-
Deploy.
-
Configure the IIS website.
-
Create a Data Protection Registry Hive.
For more information, go to https://docs.asp.net/en/latest/publishing/iis.html.
To publish to IIS using Web Deploy, use the following instructions:
-
Configure the remote IIS Server to support ASP.NET Core.
-
Create a publish profile.
-
Customize the profile to support Web Deploy publish.
For more information, go to https://docs.asp.net/en/latest/publishing/iis-with-msdeploy.html.
To publish using Visual Studio, use the following instructions:
-
Create a publish profile at Properties\PublishProfiles\profilename.pubxml. The publish profile is an MSBuild file.
-
Create a PowerShell script at Properties\PublishProfiles\profilename.ps1.
-
Call dotnet publish to gather the files to publish them to a temporary folder.
-
Call a PowerShell script to pass in the properties from the publish profile, and from where the location that the dotnet publish placed the files to publish.
For more information about publishing and Azure, go to the following links:
The following are PowerShell samples of ASP.NET Core commands to publish the Sitecore Commerce Engine.
dotnet publish |
Publishes in debug mode. |
dotnet publish --configuration Release |
Publishes in release mode, by default to this directory: C:\Src\Commerce.CommerceServer\Sdk\Sitecore.Commerce.Engine\bin\Release\net452\win7-x64\publish |
dotnet build --build-profile |
|
Additional information about publishing and running ASP.NET Core applications is available.
For more information about publishing and running ASP.NET Core Applications with IIS, go to: https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
For more information on how web publishing in Visual Studio works, go to: https://docs.asp.net/en/latest/publishing/web-publishing-vs.html