Deploying the React Store application

When you build the React Store application, a set of static files that includes flat minimized JavaScript files, HTML files, and other asset files that are required for the Store application are copied to the dist directory. These static files can be deployed to a web server such as the store-web docker that is provided, your own web server, or to any solution that can deliver static files to end shoppers such as Content Delivery networks.

Note: A deployment process is not provided with the Store SDK. You must develop your own build and deploy pipeline or you can copy the files manually to the web server.

In addition, Ingress (or any routing/web balancer) configuration on the host name/domain name is required to route any request other than /wcs/resources or /search/resources to the web server at the path where the React Store application is deployed. As the React Store application supports multiple stores, the host name/domain name configuration must also route and map to a specific storeId as a parameter in the React Store application.

Example

When you build the Reference Store application Emerald, the following files that included in the output to the dist directory:
  • Emerald/index.html
  • Emerald/static/js/* containing minified JavaScript files.
  • Emerald/static/css/* containing CSS files for the Reference Store application.
  • Emerald/robots.txt
  • Emerald/* and other files including image assets/icons used by the Reference Store application.

As shown in the store-web docker IHS container, the entire Emerald directory can be deployed and copied directly into the Document Root of the web server. The store can be launched by direct URL and paths using rewrite rules to the store application and mapping to a specific storeId or default storeId. Web servers can also be scaled with multiple instances and as an independent Single Page Application. Updates to the application can be coordinated easily in rolling fashion by adding new web servers with new deployments while gradually removing previously used servers seamlessly.