Skip to main content
Skip table of contents

Deploying ContentManager as docker container

Load Image From File

Use the file dpe-contentmanager.tar.gzip from the delivery folder to load the image

CODE
docker load < dpe-contentmanager.tar.gzip

Get Image via DAVID Systems Public Docker Registry

Contact support to get an account

Prepare settings.json

Copy the file settings.json from the delivery sub folder webapp to a location where it can be used from docker, e.g. /etc/cm/

Adapt settings.json to connect to your DPE Services, see Preparing settings.json

Create Container

CODE
docker run -p 80:80 --name content-manager --mount type=bind,source=/etc/cm/settings.json,target=/usr/share/nginx/html/settings.json dpe-contentmanager:latest 
  • Option -p <externalPort>:80 specifies which external port to use, the container internal port is always 80

  • Option --mount injects/maps the settings.json file from the host location to the inside of container

Docker Compose

Alternatively you can also use a docker compose file

compose.yaml

CODE
version: '3.7'
services:
  dpe_cm:
    container_name: cm
    image: docker-registry.davidsystems.com/dpe-contentmanager:latest
    restart: always
    ports:
      - 80:80
    volumes:
      - /etc/cm/settings.json:/usr/share/nginx/html/settings.json            

Environment Variables in a Docker Container

As an alternative to modifying and injecting the settings.json file you can also use environment variables.

The name of the environment variable must start with “CM__” and match the names inside the settings.json file.

Double underscores between names are used to map the hierarchies inside settings.json.

Square brackets are used to reference array elements.

Name postfixes are used to specify variable types different from string, e.g. “:I" for integer or “:B” for boolean.

Examples:

CODE
CM__serviceRootAddress=https://dpe.davidsystems-test.com:5256/DpeWebApplication
CM__appMenu[0]__title=My Admin
CM__testFolder__testVariable=bla
CM__testFolder__testInteger:I=123
CM__testFolder__testBoolean:B=true
CM__array[0]=bla
CM__array[1]=bli
CM__array[2]:I=999

HTTPS

The ContentManager container is supporting HTTP.

Typically, in enterprise environments a HTTPS-offloading proxy is used to route the HTTPS traffic from the outside to an internal docker container.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.