Document Properties
Kbid294Y34
Last Modified27-Jul-2020
Added to KB16-Jun-2020
Public AccessEveryone
StatusOnline
Doc TypeSupport Articles
ProductIntershop Progressive Web App

Support Article - How To Deploy a PWA Demo Server in Production Mode

Product Version

0.20.0

Product To Version


Status

final

1 Introduction

Info

This support article is valid from PWA 0.20.0.

This article describes how to deploy an Intershop Progressive Web Application (PWA) for a demo server in production mode.

The production mode uses browser-side rendering with on-demand server-side pre-rendering (Angular Universal).

For more details about this option, see Intershop Progressive Web App - Deployment Scenarios.

1.1 References

1.2 Deployment Steps

  1. Check the system requirements for the PWA - see Overview - Intershop Progressive Web App System Requirements.
  2. Download the corresponding PWA version from https://github.com/intershop/intershop-pwa/releases.

    Example
    wget https://github.com/intershop/intershop-pwa/archive/0.20.0.zip
  3. Unzip the file.

    Example
    unzip 0.20.0.zip 

    PWA <0.22.0: The directory name must not contain any dots.

  4. Change to the PWA directory.

    Example
    cd intershop-pwa
  5. Adapt the configuration file src/environments/environment.prod.ts. Set the property icmBaseURL to the corresponding ICM 7.10 system.

    import { ENVIRONMENT_DEFAULTS, Environment } from './environment.model';
    
    export const environment: Environment = {
      ...ENVIRONMENT_DEFAULTS,
      production: true,
      serviceWorker: true,
    
      /* INTERSHOP COMMERCE MANAGEMENT REST API CONFIGURATION */
      icmBaseURL: 'https://intershoppwa.azurewebsites.net',
    };
  6. Build a PWA docker image.

    docker build -t <pwa_image_name> .
  7. Deploy and start the PWA docker container.

    docker run -d -p <port>:4200 --name <container_name> <pwa_image_name>

    To enable SSL the parameter -e ssl must be added to the docker run command and the configuration parameter icmBaseURL must contain HTTPS.

    Example
    docker run -d -p 4200:4200 -e ssl --name pwa pwa_0.20.0

    Helpful docker commands for container maintenance

    • Stop a docker container: docker stop <container_name|id>
    • Start a docker container: docker start <container_name|id>
    • Remove a docker container: docker rm <container_name|id>
    • List all running docker containers: docker container ls
    • List all created docker containers: docker ps -a -s
    • Display the log output of a running docker container: docker logs <container_name|id>
  8. To access the PWA, open a web browser with the IP of the server and the configured port - example:  https://10.0.56.157:4200

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets