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
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:
- Firstly, download Java and save it to the staging directory.
Replace the downloaded Java version in build.env.
- 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.
- Then, execute the stage command ./build.sh.
- Enter ./build.sh for the persistence provider we want to use.
The value type can be any of the following:
– h2
– postgres
– mssql
– azuresql - 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.
- 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:
- 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.
- 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.
- Finally, make sure port 8443:8443 is in the Docker Compose file’s ports section.
To enable HTTP:
- 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.
- 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.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments