Bobcares

ThingWorx Docker | All about

by | Jun 13, 2022

ThingWorx Docker is a collection of Dockerfiles and supporting scripts for creating ThingWorx Platform Docker Images.

As part of our Docker Hosting support service, Bobcares responds to all inquiries, no matter how big or small.

Let’s look at ThingWorx Docker in more detail.

What is ThingWorx Docker

thingworx docker

 

We can use the Docker images for the ThingWorx Platform locally on a developer machine or in a container orchestration platform like Kubernetes.

Perform the following steps to quickly get up and running with Dockerfiles:

  1. Firstly, download Java and save it to the staging directory.

    Replace the downloaded Java version in build.env.

  2. Then, download and place ThingWorx in the staging folder.

    Rename the ThingWorx artefact Thingworx-Platform-[H2|Postgres|Mssql|Azuresql]-version.zip. Rename the file as needed, and include the version number in build.env under PLATFORM_VERSION.

  3. Then, execute the stage command ./build.sh.
  4. Enter ./build.sh for the persistence provider we want to use.

    The value type can be any of the following:

    – h2
    – postgres
    – mssql
    – azuresql

  5. Then, for the desired persistence provider, update the docker-compose-type.yml file.

    We should specify THINGWORX_INITIAL_ADMIN_PASSWORD for h2.

    TWX_DATABASE_USERNAME, TWX_DATABASE_PASSWORD, and TWX_DATABASE_SCHEMA must be specified in both the postgresql and platform sections, and THINGWORX_INITIAL_ADMIN_PASSWORD must be specified in the platform section. For the environment to start, we must define the variables identically in both the postgresql and platform sections.

    In the platform section, specify TWX_DATABASE_PASSWORD and THINGWORX_INITIAL_ADMIN_PASSWORD for mssql.

  6. Finally, execute the command docker-compose -f docker-compose-type.yml up -d.

Setting up HTTP Secure (HTTPS) and HTTP

HTTP is enabled by default, and HTTPS is disabled in the ThingWorx images provided. This is suitable for testing and development but not for production use. If we intend to use HTTPS in a production scenario, we strongly advise enabling it in order to properly secure our ThingWorx Platform.

To configure HTTPS for Docker images, follow these steps:
  1. Copy the HTTPS certificate keystore file to the Docker-mounted ThingworxPlatform folder. The volume mounts are relative to the files created by docker-compose. This is where it stores the logs and configuration files to enable container persistence. For the keystore we must name keystore.jks by default. We can override this with the SSL_KEYSTORE_FILENAME environment variables.
  2. Then, make sure the Docker Compose file has the environment variable SSL_KEYSTORE_PASSWORD set to the keystore’s encryption password and HTTPS_ENABLED set to true.
  3. Finally, make sure port 8443:8443 is in the Docker Compose file’s ports section.
To enable HTTP:
  1. Firstly, Make sure the environment variable HTTP_ENABLED is set to true or false in the Docker Compose file, depending on the requirements. The default value is true.
  2. Finally, check that port 8080:8080 is included in the ports section of the Docker Compose file.

[Looking for a solution to another query? We are just a click away.]

Conclusion

To sum up, our Support team went over ThingWorx Docker details.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.