Deploying updated Docker images with Docker Compose (for non-production usage)

Updates for HCL Commerce production environments are delivered as Docker images. To update your production environment: download newer release images, and rebuild them as custom images to include your custom code. You then deploy the custom containers.

Before you begin

Procedure

  1. Clean up any preexisting deployment.
    1. Bring down any active deployment.
      If you are using Docker Compose,
      docker-compose -f path_to_compose_yml stop
    2. Remove the old containers.
      For example, run one of the following commands.
      • If your database is running in a Docker container and the container is defined in your Docker Compose YML file, remove all containers except for the database container. If you remove the database container, then you lose your data.
        For example,
        docker-compose -f path_to_compose_yml rm txn store search web xc utils
      • If your database is not running in a Docker container, then you can use the following command.
        docker-compose -f path_to_compose_yml rm
  2. Update your environment, and deploy the latest version of the HCL Commerce containers.
    1. Update the deployment, and deploy it with the newer Docker images.
      1. Open your existing Docker Compose YML files that you used to deploy your production environments.
      2. Update the image path in the YML file to point to the new Docker image.
        For example, for the Transaction server Docker image (ts-app), if you tagged the updated image as 9.0.0.1,
        Deploy with Docker Compose
        Example
        If you are pulling images from your organization's private Docker registry
        image: Private_Docker_registry/library/ts-app:9.0.0.1
        If you used docker load to load the Docker images locally
        image: commerce/ts-app:9.0.0.1
    2. Pull the new images and deploy the containers.
      docker-compose -f path_to_compose_yml up -d
  3. Verify that the deployment is running updated containers.
    1. Run the following command.
      docker ps
      Ensure that the Docker container tags are the same as the tag that you defined in your deployment YML file.
    2. Enter each container and run the viewlabels command.
      For example,
      docker exec -it container_name bash
      /SETUP/bin/viewlabels
      Ensure that all container labels have the same date stamp.
  4. Build your search index on the updated environment.

Results

Changes to the default containers provided by HCL for HCL Commerce are now applied to your custom containers, and your production environments are updated.