Last Updated on May 9, 2023 by sandeeppote
Follow steps in this link —
Following are thre pre-requisite for setting on your local machine-
- A valid Sitecore license file.
- Windows PowerShell 5.1. PowerShell 7 is not supported at this time.
- The current long-term support (LTS) version of Node.js.
- .NET Core 3.1 SDK (check your installed version with the
- .NET Framework 4.8 SDK (see the Microsoft procedure for checking .NET Framework versions).
- Visual Studio 2019.
- Docker for Windows, with Windows Containers enabled.
- Any required components for using Sitecore Containers.
Apart from this also install Sitecore JSS CLI-
npm install -g @sitecore-jss/sitecore-jss-cli
Install the template
dotnet new -i Sitecore.DevEx.Templates --nuget-source https://sitecore.myget.org/F/sc-packages/api/v3/index.json
dotnet new sitecore.nextjs.gettingstarted -n samplejss
Should first Restores dotnet local tools for the solution and Initializes the JSS project
What is your Sitecore hostname (used if deployed to Sitecore)? (samplejss.dev.local) << leave blank or provide the host name>> How would you like to fetch Layout and Dictionary data? GraphQL REST How would you like to prerender your application? SSG SSR Which additional language do you want to support (en is already included and required)? << leave blank or type the language you want. should select da-DK by default and additional language>>
JSS application is now ready and updated for continerized environment.
Navigate to project folder and initialize the environment.
.\init.ps1 -InitEnv -LicenseXmlPath "<C:\path\to\license.xml>" -AdminPassword "<desired password>"
setx NODE_EXTRA_CA_CERTS C:\Users\sandeep\AppData\Local\mkcert\rootCA.pem
Execute up.ps1 to create containers-
CM is not coming up-
Checked the docker logs, and found this error-
The path is not set correctly. Need to escape the characters-
Change – entrypoint: powershell.exe -Command “& C:\tools\entrypoints\iis\Development.ps1” to entrypoint: powershell.exe -Command “& C:\\tools\\entrypoints\\iis\\Development.ps1” in docker-compose.override.yml file for xm1, xp0 and xp1
Take down all the containers and build again.
Now this should look fine-
Enter CM admin credentials and allow the access-
CM and App should load –
As of writing this post, this setup installed Sitecore 10.3.