Deploy your front-end application to Dataweavers Arc
Dataweavers Arc is a managed hosting platform that runs your Content SDK Next.js application in your Microsoft Azure subscription as a single-tenant deployment. Arc uses Azure Pipelines in your Azure DevOps organization to deploy your application.
This procedure assumes that your front-end application is stored in a Git repository.
This procedure does not describe:
- How to automatically update pages when content changes in SitecoreAI. To regenerate pages on publish without redeploying the application, refer to the Dataweavers documentation for Spark.
- How to configure your editing host. Your editing host continues to run in SitecoreAI.
Before you begin
- Ensure you have a Dataweavers Arc account. You can contact your regional Dataweavers representative or email hello@dataweavers.com, or speak with your Sitecore account executive about engaging with Dataweavers.
- Ensure your SitecoreAI environment and website are created.
- Provision your Arc environment in the Dataweavers Dashboard. The Dashboard deploys the Arc infrastructure into your own Azure subscription. Create one Arc environment for each SitecoreAI environment.
- Add the
@dataweavers/arc-coreand@dataweavers/redis-page-cachingnpm packages to your Next.js application. These packages connect the application to Azure Application Insights and Redis page caching and add the routes Arc uses during deployment. See How to add Dataweavers NPM packages. - Set up the Arc head application pipeline in Azure DevOps. Install the
Dataweavers Azure Pipelines for Arcextension in your Azure DevOps organization, create a service connection and an environment for each Arc environment, and add the Arc standard pipelines to your repository. See Understanding Arc pipelines. - Ensure you have the
SITECORE_EDGE_CONTEXT_IDandNEXT_PUBLIC_DEFAULT_SITE_NAMEenvironment variables and any other relevant or custom environment variables. - In your SitecoreAI instance, publish the changes that you want to make available on your website.
- Commit and push your Next.js application changes to your source control repository.
Deploy your application
You can use the Dataweavers Dashboard to configure your environment and trigger the deployment pipeline.
To deploy your application:
-
In the Dataweavers Dashboard, add the necessary environment variables:
SITECORE_EDGE_CONTEXT_ID- your unified Context ID. Use the Preview Context ID for all content and layout data, or the Live Context ID for published data only.NEXT_PUBLIC_DEFAULT_SITE_NAME- the name of the site.- Add other environment variables (
SITECORE_EDGE_URL,NEXT_PUBLIC_SITECORE_EDGE_CONTEXT_ID,SITECORE_EDITING_SECRET) including custom environment variables you've added to your .env file.
-
Trigger the deployment pipeline.
-
When the deployment finishes, verify that the site renders as expected.
If you have suggestions for improving this article, let us know!