Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I did a search of the forum and got a small number of hits but nothing directly on the developer version that does not use Postgres.
It is very easy to run tomcat in a container but I am not sure of the installation of ThingWorx. There is a need to have a self-signed certificate for example.
Has anyone done the installation of the developer edition this way?
One of the discussions in this forum had a message with an attached file of instructions for docker and ThingWorx but that link is broken now. And I think this applied to a full version of ThingWorx rather than the developer version.
Any pointers appreciated.
I will try to muddle through with an attempt to do this and will report back any success I have.
I don't want to build my own dockerfile but use a docker-ized Tomcat container and then map folders on my host to the container filesystem using volume bindings; e.g. user a docker-compose yaml file.
Jim
Well, using docker compose it was pretty easy -- no https though.
Create a docker-compose.yml file like:
TW_Test_jre8:
image: tomcat:jre8
ports:
- "8080:8080"
volumes:
- ./ThingworxStorage:/ThingworxStorage
- ./ThingworxBackupStorage:/ThingworxBackupStorage
- ./Thingworx.war:/usr/local/tomcat/webapps/Thingworx.war
environment:
- "JAVA_OPTS=-Dserver -Dd64 -Xms1024m -Xmx5g -XX:+UseNUMA -XX:+UseConcMarkSweepGC"
You do need to specify you want to use Java 8 runtime.
Not sure I needed the JAVA_OPTS but I saw them used in another forum thread.
You create folders in the directory where the yaml file is for the two ThingWorx storage folders. You also copy the thingworx.war file from the developer zip.
You expose the 8080 port from the container to localhost.
Run this with:
docker-compose up
Wait about a minute and then ThingWorx is up and running.
This is so easy that the developer release docs should recommend this as the easy-button.
Interested to hear if this works for anyone else.
Jim
I would agree that docker is a great approach for testing, teaching, and learning ThingWorx. You can spin up a test ThingWorx instance in a matter of seconds (literally) with a quick `docker run` command and can even spin up PostgreSQL, MySQL, etc to pair with ThingWorx for testing various scenarios.
We use docker build files instead and then push the image to a private repository for other people in our organization to use. For them, it's a one-line command to run a new ThingWorx instance.