Using a preconfigured PostgreSQL Docker image
You can use a preconfigured PostgreSQL Docker image to streamline the setup process and ensure consistency across environments. This approach simplifies database provisioning for both development and testing.
This PostgreSQL Docker container is intended for test environments only and should not be used for staging or production deployments.
The preconfigured PostgreSQL Docker image for HCL Commerce+ simplifies setting up a database. This environment is useful for development and testing purposes because it can be deployed and reset easily. While it works well for testing, for real production use, set up a more robust manually installed PostgreSQL system that can handle lots of users and keep data safe and always available. For production systems, see Installing and configuring PostgreSQL database.
Before you begin
Before setting up the PostgreSQL container, ensure the following requirements are met:
- Obtain the latest HCL Commerce+ Docker images, including the PostgreSQL image.
- Extract the PostgreSQL Docker Image and ensure that Docker is installed and running..
Procedure
-
Load the PostgreSQL image into Docker using the following command:
docker load -i PostgreSQL_Docker_Image -
Update the
values.yamlfile.- In the
values.yamlfile, make the following changes:- Set
tsPostgres.enabledto true (default value is true, ts postgres sample db will be deployed along with Commerce containers). -
Update:
tsPostgres.repository,tsPostgres.image,tsPostgres.tag
- Set
- Configuration in the sample ts postgres Docker image.
Update these values either in
vaultor in thevalues.yamlfile:dbName: mall dbPort: 5432 dbaUser: postgres dbaUserPassword: passw0rd dbUser: wcs dbUserPassword: wcs1 wcsadminUser: wcsadmin wcsadminUserPassword: wcs1admin
- In the
-
Verify the PostgreSQL Instance after deployment
What to do next
Improve PostgreSQL performance by tuning key parameters in the postgresql.conf configuration file.
shared_buffers: Adjust memory allocation.work_mem: Optimize query performance.maintenance_work_mem: Enhance database maintenance efficiency.
By default, Postgres is SSL enabled. You can verify
this by running the query SHOW ssl;. If it returns an on
state, SSL is enabled.