close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2107

Table Of Contents
3.2.2.1.3 Docker Compose Configuration

Configure your docker compose environment by creating or editing your .env file. All environment variable references in the Docker Compose files, can be configured using this file. Be aware, that environment variables in the current process environment have precedence over variables defined in the .env file. Below, you will find an example .env file.

In the .env file you can configure the following properties. All relative paths shown here are relative to the global/deployment/docker directory.

  • Make sure compose/development.yml is included in the COMPOSE_FILE variable, it is required to expose the container internal ports to the docker host.

  • Make sure compose/development-local.yml is included in the COMPOSE_FILE variable, it is required for content import from Blueprint and optionally for loading licenses from local coremedia-licenses directory.

  • For the docker compose development setup, make sure that you have the licenses placed at the following locations:

    coremedia-licenses/cms-license.zip
    coremedia-licenses/mls-license.zip
    coremedia-licenses/rls-license.zip

    Zip files added below this directory are by default excluded from Git version control. If you place the license files in this directory, you must not set an environment variable for the license location!

    Alternatively, you may define environment variables with license URLs and the server containers will download them at runtime. You will find the corresponding environment variables in the .env example below.

  • For the development setup, make sure that you have created or provide themes. Set either THEMES_ARCHIVE_URL or THEMES_ARCHIVE_FILE in the .env file. To re-import the themes set FORCE_REIMPORT_THEMES to true.

    If you use the provided CoreMedia themes, you must not set these environment variables because the default setting is sufficient.

  • For the development setup, make sure that you have created or provide content. Set either CONTENT_ARCHIVE_URL or CONTENT_IMPORT_DIR in the .env file. To re-import the content set FORCE_REIMPORT_CONTENT to true.

    If you use the provided CoreMedia test data, you must not set these environment variables because the default setting is sufficient.

  • Depending on the eCommerce system(s) you want to connect to, you will need to set these additional variables:

    HCL WebSphere Commerce

    SPRING_PROFILE=dev-wcs
    COMPOSE_FILE=compose/default.yml:compose/development-wcs.yml
    WCS_HOST=your.wcs.host

    SAP Hybris

    COMPOSE_FILE=compose/default.yml:compose/development-hybris.yml

    Salesforce Commerce Cloud

    COMPOSE_FILE=compose/default.yml:compose/development-sfcc.yml

By default, you can start with this file:

# This sets the compose path separator to ":" for all OS.
COMPOSE_PATH_SEPARATOR=:

# Configure a list of compose files you want to apply and
# separate them using the value of the COMPOSE_PATH_SEPARATOR.
# Be advised that ordering is crucial and last definitions
# override preceeding ones.
#  compose/default.yml - unconfigured services
#  compose/development.yml - development configuration
#  compose/development-local.yml - local licenses / content
#
# for most cases this should be your default.
COMPOSE_FILE=compose/default.yml:compose/development.yml:compose/development-local.yml

# Optional properties

# With this variable, you can set the prefix of the image repository.
# Set this to use images from a remote registry, that is,
# REPOSITORY_PREFIX=my.registry/cmcc would result in a studio-server
# image my.registry/cmcc/studio-server
# REPOSITORY_PREFIX=my.registry/cmcc

# With this variable, you can set the prefix of the image repository for
# the Commerce Adapter Docker images. Set this to use images from a remote
# registry.
# COMMERCE_REPOSITORY_PREFIX= my.registry/cmcc

# The version tags of the commerce adapter service images to be used.
# COMMERCE_ADAPTER_MOCK_VERSION=1.2.3
# COMMERCE_ADAPTER_SFCC_VERSION=1.2.3
# COMMERCE_ADAPTER_HYBRIS_VERSION=1.2.3
# COMMERCE_ADAPTER_WCS_VERSION=1.2.3

# The environment fully qualified domain name to use for the system.
# If not set, docker.localhost will be used.
# ENVIRONMENT_FQDN=docker.localhost

# enable debug agent for all spring boot apps. If you want to enable
# this only for a single service, you need to set the environment
# variable explicitly at that service.
# JAVA_DEBUG=true

# Service Specific variables

# The license url/path for the content-management-server
# CMS_LICENSE_URL=/coremedia/licenses/cms-license.zip

# The license url/path for the master-live-server
# MLS_LICENSE_URL=/coremedia/licenses/mls-license.zip

# The license url/path for the replication-live-server
# RLS_LICENSE_URL=/coremedia/licenses/rls-license.zip

# The mail server for elastic social registration mails
# ELASTIC_SOCIAL_MAIL_SMTP_SERVER=localhost

# Theme Import

# Themes can be imported from a file location or from an URL
# pointing to an zip archive containing the themes.
# By default, the variable points to the path
# /coremedia/import/frontend.zip within the management-tools
# container. To pass in an archive from your hosts file system
# include the developmemt-local.yaml file in your
# COMPOSE_FILE environment variable and configure only the path
# on your host system using the THEMES_ARCHIVE_FILE env var.
# If you don't configure that variable, the default will point
# to the frontend.zip in your workspace.
# THEMES_ARCHIVE_URL=
# THEMES_ARCHIVE_FILE=

# Force reimport of themes when set to true
# FORCE_REIMPORT_THEMES=false

# Content Import

# The directory from which the content should be imported. By default,
# this points to the content/test-data/target/ directory of the test-data module
# in the CoreMedia Bluprints workspace.
# CONTENT_IMPORT_DIR=

# Forces the reimport of the content when set to true
# FORCE_REIMPORT_CONTENT=false

# The url of a webserver, serving all content blobs during the
# server-import. If you added the content blobs to the workspace,
# you can leave this field empty. This is a CI development
# optimization to keep content image blobs out of the VCS history.
# BLOB_STORAGE_URL=

# The url to a zip archive containing content, users and optionally
# themes for import. The layout in the archive should be the same
# as the test-data module creates. This is a CI development feature
# to import content from a separated build process.
# CONTENT_ARCHIVE_URL=

# Skips the whole content and theme import when set to true
# SKIP_CONTENT=false

Note that you cannot set arbitrary environment variables in the .env file and expect, that they will be picked up by the CoreMedia Spring Boot applications. Only the variables, being referenced in compose files, can be used here.

For more information about this tooling option, visit the official Docker Compose documentation.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.