Insights

How to Easily Upload a Large Package to Install When Running Sitecore on Docker

Learn all about uploading extensive packages, overcoming default constraints, and optimizing your installation process.

Uploading Large Sitecore Install Packages

Today, I launched the upload of a 521MB Sitecore Install Package from the Sitecore Installation Wizard, and I waited a long time watching the spinner… Way too long! Then I checked my Docker CM container logs to find this clue:

2023-10-04 13:03:47 172.18.168.100 POST /sitecore/shell/applications/install/dialogs/Upload+Package/UploadPackage2.aspx di=%7B0226A53D-2DAB-42A0-8E3E-525F45FB3BF7%7D 80 - 172.18.175.126 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/117.0.0.0+Safari/537.36 https://xmcloudcm.localhost/sitecore/shell/applications/install/dialogs/Upload%20Package/UploadPackage2.aspx?di=%7B0226A53D-2DAB-42A0-8E3E-525F45FB3BF7%7D 413 1 0 9

The numbers at the end of this IIS log entry (413 1) indicate that IIS returned an HTTP 413.1 Request Entity Too Large error code to the browser. The Sitecore Install Wizard, however, did not report that to me and let me watch the spinner forever.

The default Sitecore configuration does not allow uploading packages larger than 512MB (<httpRuntime maxRequestLength="512000" />).

When you are faced with this task, you have three main options:

  1. Split the large package into smaller packages.
  2. Increase the maxRequestLength and maxAllowedContentLength in the web.config file.
  3. Manually copy the package file into the Content Management server /App_Data/packages folder.

This blog post focuses on the manual copy option when running Sitecore on Docker.

Prerequisites

  1. Ensure your CM Docker Compose service uses the Development.ps1 PowerShell script as its entrypoint, similar to this:

     cm:
       entrypoint: powershell -Command "& C:/tools/entrypoints/iis/Development.ps1"
    
  2. Ensure that your CM Docker Compose service has a volume mounted to deploy files to its web root, similar to this:

     cm:
       volumes:
         - ${LOCAL_DEPLOY_PATH}\platform:C:\deploy
    

Manually Upload the Sitecore Install Package

  1. Resolve the path to the \platform folder on your host by replacing the environment variable with its value. e.g.: For me, it resolved to C:\projects\<ProjectName>\docker\deploy\platform.
  2. In this \platform folder, create the \App_Data\packages subfolders.
  3. In the \packages folder, paste your large Sitecore Install Package file.
    1. The Development.ps1 Docker container entrypoint will copy the file from the container C:\deploy folder to the /App_Data/packages subfolder of the web root inside the container.

Voila! Your package is uploaded, and you can now select it from the Sitecore Installation Wizard.



Meet Jeff L'Heureux

Director of Technology

🧗‍♂️🏔️ 🍺

Jean-François (Jeff) L'Heureux is an experienced leader in Sitecore and Coveo technologies, having worked in both organizations. He is a three-times Sitecore Technology MVP and three-time Coveo MVP. He has 16 years of software development experience, including ten years of Sitecore experience. He specializes in front-end, and he has experience in technologies like Next.js, React, Vercel, Netlify, Docker, Coveo Cloud, Coveo for Sitecore, Sitecore XP/XM, and the latest Sitecore technologies, including XM Cloud, JSS, CDP, Personalize, OrderCloud, Discover, Send, Search, and Content Hub ONE. Outside work, he can be found outside rock climbing, mountain biking, hiking, snowshoeing, or cross-country skiing.

Connect with Jeff