Sitecore Commerce module reference

Sitecore Experience Commerce (XC) provides module asset images that you use to create custom Sitecore Commerce Docker images. These asset images are available in Sitecore Container Registry (SCR), and contain all the content and scripts required to include a Sitecore XC module in your Sitecore Experience Platform (XP) solution build.

Sitecore provides the following XC module asset images:

  • sitecore-xc0-assets - This image contains the required XC0 assets you add to a Sitecore Experience Platform - Single (XP0) configuration.

    Note

    The sitecore-xc0-assets image does not include the sample SXA Storefront.

  • sitecore-xc1-assets - This image contains the required XC1 assets you add to a Sitecore Experience Platform distributed deployment (XP1) configuration.

    Note

    The sitecore-xc1-assets image does not include the sample SXA Storefront.

  • sitecore-xc1-storefront-assets - This image contains the required sample SXA storefront assets you add to a Sitecore Experience Platform distributed (XP1) configuration.

    Note

    The sitecore-xc1-storefront-assets image requires the content from the sitecore-xc1-assets image as a prerequisite.

You can refer to the Sitecore.Commerce.Containers.SDK for examples of how Sitecore XC assets are used in Sitecore XP0 and XP1 configurations. The Sitecore.Commerce.Containers.SDK is available on the Sitecore Downloads site.

The following details the contents that you must add to your custom Dockerfile file to make use of Sitecore XC module assets when you build custom images.

Each XC module corresponds to a topology configuration, and contains all assets required to include the roles used in the topology.

Image repository

  • scr.sitecore.com/sxc/xc0-assets

Dockerfile instructions

  • mssql:

    FROM <xc0-assets-image> AS assets1
    COPY --from=assets C:\module\db C:\dacpacs
    COPY --from=assets C:\module\tools\scripts  C:\tools
    RUN C:\DeployDatabases.ps1 -ResourcesDirectory C:\dacpacs -DatabaseOwner "sa" -EnableContainedDatabaseAuth; `
     .\tools\DeployRoles.ps1 -coreDatabaseName $env:SITECORE_CORE_DB; `
     Remove-Item .\dacpacs -Recurse -Force; `
     Remove-Item .\tools -Recurse -Force;
    
    
  • solr-init:

    FROM <xc0-assets-image> AS assets
    ENV SOLR_SITECORE_CONFIGSET_SUFFIX_NAME=_config `
        SOLR_REPLICATION_FACTOR=1 `
        SOLR_NUMBER_OF_SHARDS=1 `
        SOLR_MAX_SHARDS_NUMBER_PER_NODES=1 `
        SOLR_CORE_PREFIX_NAME=sitecore `
        SOLR_XDB_SCHEMA_FILE=${SOLR_XDB_SCHEMA_FILE} `
        TOPOLOGY=${XC_TOPOLOGY} `
        SOLR_COMMERCE_PREFIX_NAME=commerce `
        SOLR_COMMERCE_POSTFIX_NAME=Scope `
        SOLR_COMMERCE_REBUILD_POSTFIX_NAME=-Rebuild
    
    COPY --from=assets C:\module\solr C:\data
    COPY --from=assets C:\module\tools\scripts\New-SolrCore-Commerce.ps1 C:\module\tools\scripts\Start-Commerce.ps1  C:\
    
    ENTRYPOINT .\Start-Commerce.ps1 -SitecoreSolrConnectionString $env:SITECORE_SOLR_CONNECTION_STRING `
    -SolrCorePrefix $env:SOLR_CORE_PREFIX_NAME `
    -SolrSitecoreConfigsetSuffixName $env:SOLR_SITECORE_CONFIGSET_SUFFIX_NAME `
    -SolrReplicationFactor $env:SOLR_REPLICATION_FACTOR `
    -SolrNumberOfShards $env:SOLR_NUMBER_OF_SHARDS `
    -SolrMaxShardsPerNodes $env:SOLR_MAX_SHARDS_NUMBER_PER_NODES `
    -SolrXdbSchemaFile .\data\schema.json `
    -CommerceSolrConnectionString $env:Commerce_SOLR_CONNECTION_STRING `
    -SolrCommercePrefix $env:SOLR_COMMERCE_PREFIX_NAME `
    -SolrCommercePostfix $env:SOLR_COMMERCE_POSTFIX_NAME `
    -SolrCommerceRebuildPostfix $env:SOLR_COMMERCE_REBUILD_POSTFIX_NAME
  • cm:

    FROM <xc0-assets-image> AS assets
    WORKDIR c:/inetpub/wwwroot
    
    COPY --from=assets module/cm/content/inetpub/wwwroot .
    COPY --from=assets module/cm/content/Permissions C:\Permissions
    COPY --from=assets module/cm/content/xdts C:\xdts
    COPY --from=assets module/tools  C:\tools
    
    RUN New-Item -Path C:\inetpub\wwwroot\App_Config -Name Security-Shared -ItemType directory; `
        c:\tools\nuget.exe install Microsoft.Web.Xdt -Version 3.0.0 -OutputDirectory C:\tools -ExcludeVersion; ` 
        c:\tools\scripts\Invoke-XdtTransformations.ps1 -TargetPath c:\inetpub\wwwroot -XdtPath c:\xdts -XdtDllPath c:\tools\Microsoft.Web.Xdt\lib\netstandard2.0\Microsoft.Web.XmlTransform.dll;`
        Push-Location c:/inetpub/wwwroot/App_Config/Include/Y.Commerce.Engine; `
        Rename-Item Sitecore.Commerce.Engine.DataProvider.config.disabled Sitecore.Commerce.Engine.DataProvider.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Common.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Common.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Solr.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Solr.config; `
        Pop-Location; `
        Remove-Item -Path "./XConnectFiles/" -Recurse -Force;
  • xconnect:

    FROM <xc0-assets-image> AS assets
    WORKDIR /inetpub/wwwroot
    
    COPY --from=assets module/xconnect/content/inetpub/wwwroot C:\module
    COPY --from=assets module/ xconnect/content/inetpub/wwwroot /App_data .\App_data\
    
    RUN Copy-Item -Path "C:\module\*.dll" -Destination "C:\inetpub\wwwroot\bin"; `
        Remove-Item -Path "C:\module" -Recurse -Force;
  • xdbsearchworker:

    FROM <xc0-assets-image> AS assets
    WORKDIR /service
    COPY --from=assets module/xdbsearchworker/content/inetpub/wwwroot/App_Data/jobs/continuous/IndexWorker .
  • xdbautomationworker:

    FROM <xc0-assets-image> AS assets
    FROM <xc0-assets-image> AS assets
    WORKDIR /service
    COPY --from=assets module/ xdbautomationworker/content/inetpub/wwwroot/App_Data/jobs/continuous/AutomationEngine .

Image repository

  • scr.sitecore.com/sxc/sitecore-xc1-assets

Dockerfile instructions

  • mssql-init:

    FROM <xc1-assets-image> AS assets
    COPY --from=assets C:\module\db C:\resources
    COPY --from=assets C:\module\tools\scripts\StartCommerceInit.ps1 C:\module\tools\scripts\DeployRoles.ps1 C:\module\tools\scripts\CreateExternalDataSources.ps1  C:\
    
    ENTRYPOINT .\StartCommerceInit.ps1 -ResourcesDirectory $env:RESOURCES_PATH -SqlServer $env:SQL_SERVER -SqlAdminUser $env:SQL_ADMIN_LOGIN -SqlAdminPassword $env:SQL_ADMIN_PASSWORD -SitecoreAdminPassword $env:sitecore_admin_password -SqlElasticPoolName $env:SQL_ELASTIC_POOL_NAME -CoreDatabaseName $env:SITECORE_CORE_DB -SharedDatabaseName $env:XC_SHARED_DB -ArchiveDatabaseName $env:XC_SHARED_ARCHIVE_DB -MasterkeyPassword $env:XC_DB_Masterkey_Password  `
        -DatabaseUsers @( `
        @{'databaseName' = 'Sitecore.Master'; 'username' = $env:Master_Database_Username; 'password' = $env:Master_Database_Password}, `
        @{'databaseName' = 'Sitecore.Core'; 'username' = $env:Core_Database_Username; 'password' = $env:Core_Database_Password}, `
        @{'databaseName' = 'Sitecore.Web'; 'username' = $env:Web_Database_Username; 'password' = $env:Web_Database_Password}, `
        @{'databaseName' = 'Sitecore.Experienceforms'; 'username' = $env:Forms_Database_Username; 'password' = $env:Forms_Database_Password}, `
        @{'databaseName' = 'Sitecore.Exm.master'; 'username' = $env:Exm_Master_Database_Username; 'password' = $env:Exm_Master_Database_Password}, `
        @{'databaseName' = 'Sitecore.Marketingautomation'; 'username' = $env:Marketing_Automation_Database_Username; 'password' = $env:Marketing_Automation_Database_Password}, `
        @{'databaseName' = 'Sitecore.Messaging'; 'username' = $env:Messaging_Database_Username; 'password' = $env:Messaging_Database_Password }, `
        @{'databaseName' = 'Sitecore.Reporting'; 'username' = $env:Reporting_Database_Username; 'password' = $env:Reporting_Database_Password }, `
        @{'databaseName' = 'Sitecore.Referencedata'; 'username' = $env:Reference_Data_Database_Username; 'password' = $env:Reference_Data_Database_Password }, `
        @{'databaseName' = 'Sitecore.Processing.Pools'; 'username' = $env:Processing_Pools_Database_Username; 'password' = $env:Processing_Pools_Database_Password }, `
        @{'databaseName' = 'Sitecore.Processing.Tasks'; 'username' = $env:Processing_Tasks_Database_Username; 'password' = $env:Processing_Tasks_Database_Password }, `
        @{'databaseName' = 'Sitecore.Processing.Engine.Tasks'; 'username' = $env:Processing_Engine_Tasks_Database_Username; 'password' = $env:Processing_Engine_Tasks_Database_Password }, `
        @{'databaseName' = 'Sitecore.Processing.Engine.Storage'; 'username' = $env:Processing_Engine_Storage_Database_Username; 'password' = $env:Processing_Engine_Storage_Database_Password }, `
        @{'databaseName' = 'Sitecore.Xdb.Collection.ShardMapManager'; 'username' = $env:Collection_ShardMapManager_Database_Username; 'password' = $env:Collection_ShardMapManager_Database_Password }, `
        @{'databaseName' = 'Sitecore.Xdb.Collection.Shard0'; 'username' = $env:Collection_ShardMapManager_Database_Username; 'password' = $env:Collection_ShardMapManager_Database_Password }, `
        @{'databaseName' = 'Sitecore.Xdb.Collection.Shard1'; 'username' = $env:Collection_ShardMapManager_Database_Username; 'password' = $env:Collection_ShardMapManager_Database_Password } `
        )
  • solr-init:

    FROM <xc1-assets-image> AS assets
    ENV SOLR_SITECORE_CONFIGSET_SUFFIX_NAME=_config `
        SOLR_REPLICATION_FACTOR=1 `
        SOLR_NUMBER_OF_SHARDS=1 `
        SOLR_MAX_SHARDS_NUMBER_PER_NODES=1 `
        SOLR_CORE_PREFIX_NAME=sitecore `
        SOLR_XDB_SCHEMA_FILE=${SOLR_XDB_SCHEMA_FILE} `
        TOPOLOGY=${XC_TOPOLOGY} `
        SOLR_COMMERCE_PREFIX_NAME=commerce `
        SOLR_COMMERCE_POSTFIX_NAME=Scope `
        SOLR_COMMERCE_REBUILD_POSTFIX_NAME=-Rebuild
    
    COPY --from=assets C:\module\solr C:\data
    COPY --from=assets C:\module\tools\scripts\New-SolrCore-Commerce.ps1 C:\module\tools\scripts\Start-Commerce.ps1  C:\
    
    ENTRYPOINT .\Start-Commerce.ps1 -SitecoreSolrConnectionString $env:SITECORE_SOLR_CONNECTION_STRING `
    -SolrCorePrefix $env:SOLR_CORE_PREFIX_NAME `
    -SolrSitecoreConfigsetSuffixName $env:SOLR_SITECORE_CONFIGSET_SUFFIX_NAME `
    -SolrReplicationFactor $env:SOLR_REPLICATION_FACTOR `
    -SolrNumberOfShards $env:SOLR_NUMBER_OF_SHARDS `
    -SolrMaxShardsPerNodes $env:SOLR_MAX_SHARDS_NUMBER_PER_NODES `
    -SolrXdbSchemaFile .\data\schema.json `
    -CommerceSolrConnectionString $env:Commerce_SOLR_CONNECTION_STRING `
    -SolrCommercePrefix $env:SOLR_COMMERCE_PREFIX_NAME `
    -SolrCommercePostfix $env:SOLR_COMMERCE_POSTFIX_NAME `
    -SolrCommerceRebuildPostfix $env:SOLR_COMMERCE_REBUILD_POSTFIX_NAME
  • xdbcollection

    FROM <xc1-assets-image> AS assets
    WORKDIR /inetpub/wwwroot
    COPY --from=assets module/xdbcollection/content/inetpub/wwwroot ./
  • prc:

    FROM <xc1-assets-image> AS assets
    WORKDIR /inetpub/wwwroot
    COPY --from=assets module/prcrep/content/inetpub/wwwroot ./
  • cm:

    FROM <xc0-assets-image> AS assets
    WORKDIR c:/inetpub/wwwroot
    
    COPY --from=assets module/cm/content/inetpub/wwwroot .
    COPY --from=assets module/cm/content/Permissions C:\Permissions
    COPY --from=assets module/cm/content/xdts C:\xdts
    COPY --from=assets module/tools  C:\tools
    
    RUN New-Item -Path C:\inetpub\wwwroot\App_Config -Name Security-Shared -ItemType directory; `
        c:\tools\nuget.exe install Microsoft.Web.Xdt -Version 3.0.0 -OutputDirectory C:\tools -ExcludeVersion; ` 
        c:\tools\scripts\Invoke-XdtTransformations.ps1 -TargetPath c:\inetpub\wwwroot -XdtPath c:\xdts -XdtDllPath c:\tools\Microsoft.Web.Xdt\lib\netstandard2.0\Microsoft.Web.XmlTransform.dll;`
        Push-Location c:/inetpub/wwwroot/App_Config/Include/Y.Commerce.Engine; `
        Rename-Item Sitecore.Commerce.Engine.DataProvider.config.disabled Sitecore.Commerce.Engine.DataProvider.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Common.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Common.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Solr.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Solr.config; `
        Pop-Location; `
    Remove-Item -Path "./XConnectFiles/" -Recurse -Force;
  • cd:

    FROM <xc0-assets-image> AS assets
    WORKDIR c:/inetpub/wwwroot
    
    COPY --from=assets module/cd/content/inetpub/wwwroot .
    COPY --from=assets module/cd/content/Permissions C:\Permissions
    COPY --from=assets module/cd/content/xdts C:\xdts
    COPY –from=assets module/tools  C:\tools
    
    RUN New-Item -Path C:\inetpub\wwwroot\App_Config -Name Security-Shared -ItemType directory; `
        c:\tools\nuget.exe install Microsoft.Web.Xdt -Version 3.0.0 -OutputDirectory C:\tools -ExcludeVersion; ` 
        c:\tools\scripts\Invoke-XdtTransformations.ps1 -TargetPath c:\inetpub\wwwroot -XdtPath c:\xdts -XdtDllPath c:\tools\Microsoft.Web.Xdt\lib\netstandard2.0\Microsoft.Web.XmlTransform.dll;`
        Push-Location c:/inetpub/wwwroot/App_Config/Include/Y.Commerce.Engine; `
        Rename-Item Sitecore.Commerce.Engine.DataProvider.config.disabled Sitecore.Commerce.Engine.DataProvider.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Common.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Common.config; `
        Rename-Item Sitecore.Commerce.Engine.Connectors.Index.Solr.config.disabled Sitecore.Commerce.Engine.Connectors.Index.Solr.config; `
        Pop-Location; `
       Remove-Item -Path "./XConnectFiles/" -Recurse -Force;
  • xdbsearch:

    FROM <xc1-assets-image> AS assets
    WORKDIR c:/inetpub/wwwroot
    COPY --from=assets module/xdbsearch/content/inetpub/wwwroot/App_Data/jobs/continuous/IndexWorker /App_data ./App_data/
  • xdbsearchworker:

    FROM <xc1-assets-image> AS assets
    WORKDIR /service
    COPY --from=assets module/xdbsearchworker/content/inetpub/wwwroot/App_Data/jobs/continuous/IndexWorker .
  • xdbautomation:

    FROM <xc1-assets-image> AS assets
    WORKDIR /inetpub/wwwroot
    
    COPY --from=assets module/xdbautomation/content/inetpub/wwwroot/App_data/jobs/continuous/AutomationEngine C:\module
    COPY --from=assets module/xdbautomation/content/inetpub/wwwroot/App_data/jobs/continuous/AutomationEngine /App_data .\App_data\
    
    RUN Copy-Item -Path "C:\module\*.dll" -Destination "C:\inetpub\wwwroot\bin"; `
        Remove-Item -Path "C:\module" -Recurse -Force;

Note

sitecore-xc1-storefront-assets require sitecore-xc1-assets as a prerequisite.

sitecore-xc1-storefront-assets make use of Sitecore PowerShell Extensions (SPE) and Sitecore Experience Accelerator (SXA) assets modules.

Image repository

  • scr.sitecore.com/sxc/sitecore-xc1-storefront-asset

Note

Refer to the contents of the xc1-cxa folder in the Sitecore.Commerce.Containers.SDK for a full example of how to use the sitecore-xc-storefront-assets image.