Related Github Documents
Document Properties
Last Modified19-Feb-2021
Added to KB20-Oct-2020
Public AccessEveryone
Doc TypeGuidelines, Concepts & Cookbooks
ProductIntershop Progressive Web App

Guide - Intershop Progressive Web App - Building and Running nginx Docker Image

Building and Running nginx Docker Image

We provide a docker image based on nginx for the PWA deployment.


The docker image can be built by running a docker build with the Dockerfile located in the nginx folder.


Mandatory environment variables:

  • Connect it to the PWA with UPSTREAM_PWA in the form of http(s)://<IP>:<PORT>

For HTTP, the server will run on default port 80.
If HTTPS is chosen as an upstream, it will run on default port 443.
In the latter case the files server.key and server.crt have to be supplied in the container folder /etx/nginx (either by volume mapping with docker run or in the image itself by docker build).


If the nginx container is run without further configuration, the default Angular CLI environment properties are not overridden.
Multiple PWA channels can be set up by supplying a YAML configuration listing all domains the PWA should work for.

The first way of supplying a configuration for domains is to add multiple domain configuration nodes and specify properties:

  channel: channel1
  application: app1
  features: f1,f2,f3
  lang: la_CO
  theme: name|color

The domain is interpreted as a regular expression.
Subdomains (b2b\..+) as well as top level domains (.+\.com) can be supplied.
The channel property is also mandatory.

All other properties are optional:

  • application: The ICM application
  • identityProvider: The active identity provider for this site
  • features: Comma-separated list of activated features
  • lang: The default language as defined in the Angular CLI environment
  • theme: The theme used for the channel (format: <theme-name>(|<icon-color>)?)

Dynamically directing the PWA to different ICM installations can by done by using:

  • icmHost: the domain where the ICM instance is running (without protocol and port)
  • icmPort: (optional) if the port differs from 443
  • icmScheme: (optional) if the protocol differs from 'https'

Multiple channels can also be configured via context paths, which re-configure the PWA upstream to use a different baseHref for each channel.

  - baseHref: /us
    channel: channelUS
    lang: en_US
  - baseHref: /de
    channel: channelDE
    lang: de_DE

The domain has to be supplied, to match all domains use .+.
The parameters baseHref and channel are mandatory.
baseHref must start with /.
Also note that context path channels have to be supplied as a list.
The first entry is chosen as default channel, if the website is accessed without supplying a channel.

This configuration can be supplied simply by setting the environment variable MULTI_CHANNEL.
Alternatively, the source can be supplied by setting MULTI_CHANNEL_SOURCE in any supported format by gomplate.
If no environment variables for multi-channel configuration are given, the configuration will fall back to the content of nginx/multi-channel.yaml, which can also be customized.

⚠️ Multi-Channel configuration with context paths does not work in conjunction with service workers

An extended example can be found in the docker-compose.yml in the project root.


The page speed configuration can also be overridden:

  • Set the environment variable NPSC_ENABLE_FILTERS to a comma-separated list of active Page Speed Filters to override our carefully chosen defaults. Do this at your own risk.

Built-in features can be enabled and disabled:

  • CACHE=off disables caching (default on)
  • PAGESPEED=off disables pagespeed optimizations (default on)
  • COMPRESSION=off disables compression (default on)
  • DEVICE_DETECTION=off disables user-agent detection (default on)
  • PROMETHEUS=on enables Prometheus metrics exports on port 9113 (default off)


New features can be supplied in the folder nginx/features.
A file named <feature>.conf is included if the environment variable <feature> is set to on, 1, true or yes (checked case in-sensitive).
The feature is disabled otherwise and an optional file <feature>-off.conf is included in the configuration.
The feature name must be all word-characters (letters, numbers and underscore).

Disabling Cache

If the cache feature is switched off, all caching for pre-rendered pages is disabled.
If the cache should also be disabled for static resources, the page speed feature has to be switched off as well as it caches optimized images individually.

Further References


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