I've been working with XM Cloud in a SaaS environment. For development, I need a local setup. A GitHub repository offers a Docker environment for this purpose, so I plan to use it to run XM Cloud locally.
Up until now, we have only operated in a SaaS environment for XM Cloud. When it comes to actual development, we want to have the same environment on hand. Since a Docker environment that can be run on hand is available in the GitHub repository where it was created, I would like to use it this time and start it in my local environment.
Get code from GitHub
Clone the code from the repository created on GitHub at hand. In this section, we will use GitHub Desktop to deploy the code at hand. First, specify the target repository.
Create a clone (this time deployed to c:\projects\sxastarter) After creating the clone, switch to development for the branch。
This completes the preparation.
Project Initialization
The repository provides a script, init.ps1, for initialization. This script specifies the location of the license file and the administrator's password. Note that the terminal must be opened with administrator privileges in order to create a self-certificate when executing the script.
The script to run is as follows
.\init.ps1 -InitEnv -LicenseXmlPath "C:\projects\license\license.xml" -AdminPassword "DesiredAdminPassword"
Then run up.ps1, the script provided to start and initialize the container. The pattern of execution with the above command is shown below.
.\up.ps1
The above script will ask you to log in once when you are ready, while it performs container builds, etc. This login is required to log in to XM Cloud, so please log in with your account.
After logging in, the following screen will appear.
Once the procedures for indexing and importing the required items are complete, the browser is launched and the script is closed.
The browser shows that the XM Cloud environment is up and running using Docker.
Summary
The local working environment is ready. However, at this stage, XM Cloud has just started and there is no data. In the next article, we will deploy using the Sitecore CLI to reflect the site information created by XM Cloud in the local environment.
A video digest of the above content is available on YouTube. Please refer to it.