HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In

Code package format

This topic describes how to create code packages when deploying through the Deployment API for Optimizely Digital Experience Platform (DXP).

Code package naming convention

The first step to use the API is to bundle your web application into a code package. Use the following conventions when you name a code package (a package containing Web App binaries, configuration and so on).

<app name>.<package type>.app.<version>.nupkg
  • App name. Optional.
  • Package types. Values are:
    • cms (primary Web App)
  • Version. You can specify in different ways such as using a "date format" or a version number.

Example code package names

cms.app.1.0.0.nupkg
customer.cms.app.1.0.0.nupkg

(In this example, customer is the app name.)

Code package content

The package should contain the Web App-related files.

Only folders and files related to the code are allowed (that is, wwwroot, binaries, appSettings.json etc.), and a metadata file (optional) that should follow the package name.

Sample folder structure

myapp.cms.app.1.0.0.nupkg
  wwwroot
  appsettings.json
  appsettings.Integration.json
  appsettings.Preproduction.json
  appsettings.Production.json
  dxpPlatformSettings.json
  myapp.dll
  ......
  myapp.cms.app.nuspec (optional)

Environment configurations need to be a part of the code package.

You can download an Optimizely Content Management System (CMS) sample site (Alloy) package example here: alloy-linux.cms.app.20230221.nupkg

Create a code package

You can create a package by deploying to a folder and zipping this folder, as shown in the following example.

dotnet publish ~/projects/myapp/myapp.csproj

You can zip this folder (SitePackageContent in the example) as cms.app.1.0.0.nupkg  to make it a deployment package that you can use in DXP.

Platform settings file

To support making some additional configurations, you can include dxpPlatformSettings.json, which should follow the JSON schema published here: <<https://schema.episerver.net/paasportal/2022-03-24/platformschema.json>>

This lets you explicitly specify what entry point to use for your application, if it contains multiple assemblies and you are worried the wrong one might be used.

This also allows for the installation of additional platform packages that extends the image beyond what is normally allowed in a code package, such as the installation of a newer NodeJs version