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
- Ensure that your private Docker registry is updated with the latest Docker images.
- Run the
updatedb
utility to update your database. - Beginning in HCL Commerce 9.1.14.0, application container images are built to be run as a non-root user by default. This change has the potential to break your custom deployment. Therefore, you must review this change and its potential impacts. For more information, see HCL Commerce container users and privileges.
About this task
Improvements include:
- A simplified directory structure for mounted volumes.
- For the ease of import of essential files into your Docker images, without the need to create or recreate custom images;
- For persistence of HCL Commerce demo data, in the event that your containers are taken offline or restarted.
- Automated deployment of Docker images for use within an HCL Commerce development environment.
- Improved deployment automation. Simply update the required environment information and
run a script to configure and deploy HCL Commerce and related applications. This
eliminates the need to manual edit your deployment files, which can be error-prone.
For more information on deployment configuration, see The Docker Compose deployment env.sh configuration file.
Due to these improvements, the following procedure varies between releases.
Procedure
-
Clean up any preexisting deployment.
-
Update your environment, and deploy the latest version of the HCL Commerce
containers.
- If you are using a version of HCL Commerce 9.1.6.0 or
greater:
Complete the procedure outlined within Deploying HCL Commerce Version 9.1.6.0 or greater with Docker Compose (for non-production usage).
- If you are using a version of HCL Commerce prior to 9.1.6.0:
- Update the deployment with the newer Docker images.
- Open your existing Docker Compose YML files that you used to deploy your production environments.
- 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 locallyimage: commerce/ts-app:9.0.0.1
- Pull the new images and deploy the new
containers.
docker-compose -f path_to_compose_yml up -d
- Update the deployment with the newer Docker images.
- If you are using a version of HCL Commerce 9.1.6.0 or
greater:
-
Verify that the deployment is running updated containers.
- Build your search index on the updated environment.