Deployment & Build
Instructions how to build Smartstore
There are two options to build Smartstore and several ways to build Docker images and containers.
Option 1 - Publish the entry host project
Open the Smartstore solution in Visual Studio 2022
Use Release configuration
(Re)build the solution
Publish host project Smartstore.Web
Option 2 - Run a build script
Run the build script corresponding with your target platform in the build directory: build.{Platform}.cmd
. The resulting build is placed in the build/artifacts/Community.{Version}.{Platform}/ directory. In addition, a zip archive is automatically created in build/artifacts/.
By default, the build script produces a platform-specific, self-contained application that includes: the ASP.NET runtime and libraries, the Smartstore application, and its dependencies. You can run it on any machine that doesn’t have the .NET runtime installed.
Smartstore uses Nuke (https://nuke.build/) as its build automation solution, which makes it easy to customize the build process by editing the src/Smartstore.Build/Smartstore.Build/Build.cs
file.
Info about src/Smartstore.Web/Modules directory
When the solution is built, all modules in src/Smartstore.Modules/
are detected, compiled, and placed in the src/Smartstore.Web/Modules/
directory. The application runtime uses this directory as a source from which to dynamically load modules. During development, however, the Modules directory is irrelevant. You can safely delete it at any time.
Creating Docker images
To create a Docker image run build/dockerize.{Platform}[.nobuild].sh
.
dockerize.linux.sh
Creates a Debian Linux base image including the complete ASP.NET runtime.
Builds the solution.
Publishes a framework-specific application within the Linux container.
Installs the native wkhtmltopdf library which is required to generate PDF files.
dockerize.linux.nobuild.sh
Much faster, but requires that the application was previously built and is located in build/artifacts/Community.{Version}.linux-x64
.
Creates a Debian Linux base image including only the ASP.NET runtime dependencies.
Copies the build artifact.
Installs wkhtmltopdf native library which is required to generate PDF files.
dockerize.windows.nobuild.sh
Requires, that the application was previously built, is located in build/artifacts/Community.{Version}.win-x64
and the Docker engine is running a Windows image.
Creates a Windows Nano Server base image including only the ASP.NET runtime dependencies.
Copies the build artifact.
Creating Docker containers
To create a ready-to-run Docker container including a database server run compose.{DbSystem}.sh
.
compose.mysql.sh
Creates a composite Docker container including the Smartstore application image and the latest MySql image.
compose.sqlserver.sh
Creates a composite Docker container including the Smartstore application image and the latest MS SQL Server image.
Last updated
Was this helpful?