This video tutorial shows how to build and run Intershop PWA SSR (Server Side Rendering) images and NGINX Docker images.
This video tutorial shows the relevant steps to build and run PWA SSR images and NGINX Docker images. This includes the following tasks:
For this tutorial we will use Visual Studio Code, but the implementations could, for example, also be done through a command line alone.
icmBaseURLto the running ICM 7.10 server.
The demo server for the PWA version 7.10 can be used for testing purposes: "https://jxdemoserver6.intershop.de"
Since PWA version 1.0 the
icmBaseURL needs to be defined in src/environments/environment.model.ts.
docker build --no-cache -t pwa_image .
Run the PWA Docker image with the following command:
docker run -d -p 4200:4200/tcp -e SSL=1 -e TRUST_ICM=true --restart always --name pwa_container pwa_image
The multi PWA proxy listening with https is not working with PWA version 1.0 due to the issue HTTPS on SSR container is not working anymore #851. To avoid this issue with PWA 1.0, run the PWA Docker image without the environment variable
If you want a multi-channel approach to be enabled, open the multi-channel.yaml file under nginx | multi-channel.yaml and adjust it according to your own environment.
.+: - baseHref: /b2c lang: en_US channel: inSPIRED-inTRONICS-Site - baseHref: /b2b lang: en_US channel: inSPIRED-inTRONICS_Business-Site features: quoting,businessCustomerRegistration,advancedVariationHandling,quickorder,orderTemplates,punchout theme: "blue|688dc3"
Open the Dockerfile under nginx | Dockerfile and add the copy instructions for both files:
COPY server.crt /etc/nginx/ COPY server.key /etc/nginx/
Build the NGINX Docker image by running the following command:
docker build --no-cache -t nginx_image nginx .
List all Docker containers by running the following command:
docker ps -a -s
docker inspect <CONTAINER ID>
docker run -d --name "nginx_container" --restart always -e SSL=1 -e TRUST_ICM=true -p 443:443 -e UPSTREAM_PWA=https://<IPAddress>:4200 nginx_image
docker stop pwa_container
docker stop nginx_container
Adjust the content of the file according to your needs.
version: '3' services: pwa: build: context: . args: configuration: production serviceWorker: 'false' restart: always environment: - LOGGING=on - ICM_BASE_URL - TRUST_ICM=true - SSL=1 nginx: build: nginx depends_on: - pwa restart: always environment: UPSTREAM_PWA: 'https://pwa:4200' CACHE: 1 PAGESPEED: 1 PROMETHEUS: 0 COMPRESSION: 1 DEVICE_DETECTION: 1 MULTI_CHANNEL: | .+: - baseHref: /b2c lang: en_US channel: inSPIRED-inTRONICS-Site - baseHref: /b2b lang: en_US channel: inSPIRED-inTRONICS_Business-Site features: quoting,businessCustomerRegistration,advancedVariationHandling,quickorder,orderTemplates,punchout theme: "blue|688dc3" ports: - '443:443'
Run the command:
docker-compose up -d --build
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.