close

Filter

Connector for commercetools Manual / Version 2406.1

Table Of Contents

3.3 Building and Running the Commerce Adapter

You can run the Commerce Adapter in a Docker container provided by CoreMedia.

In order to build and run the container, you need the following tools:

  • Maven

  • Docker

  • Docker Compose (optional)

Proceed as follows:

  1. Clone the workspace from https://github.com/coremedia-contributions/commerce-adapter-commercetools. It contains a Docker setup for the commercetools Connector.

  2. Build the workspace with mvn clean install to create a coremedia/commerce-adapter-commercetools Docker image

  3. When you run the Docker container, you have to provide the required configuration properties for the adapter ( see Section 3.1, “Configuring the Commerce Adapter”). The most common options would be either setting environment variables (using the Docker option --env or --env-file) or mounting a configuration file (using the Docker option --volume).

    Start the Docker container with the following command:

    docker run \
      --detach \
      --rm \
      --name commerce-adapter-commercetools \
      --publish 44165:6565 \
      --publish 44181:8081 \
      [--env ...|--env-file ...|--volume] \
      coremedia/commerce-adapter-commercetools:${ADAPTER_VERSION}
Integrating the adapter container into Blueprint Docker environment

To run the commerce-adapter-commercetools Docker container with the CoreMedia Content Cloud Docker environment, add the commerce-adapter-commercetools.yml compose file, which is provided with the CoreMedia Blueprint Workspace, to the COMPOSE_FILE variable in the Docker Compose .env file. Ensure that the environment variables that are passed to the Docker container are also defined in the .env file:

COMPOSE_FILE=compose/default.yml:compose/commerce-adapter-commercetools.yml
COMMERCETOOLS_API_AUTH_URL=...
...

The commerce-adapter-commercetools container is started with the CoreMedia Content Cloud Docker environment when running

docker compose up --detach

Detailed information about how to set up the CoreMedia Content Cloud Docker environment can be found in Chapter 2, Docker Setup in Deployment Manual.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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