Using ThingWorx Docker Compose Examples
This topic describes how to start, stop, and troubleshoot the ThingWorx Docker Compose examples.
|
If your Compose files are not named docker-compose.yml, you must pass additional arguments to the Docker compose command, such as in the following examples:
• docker compose -f docker-compose-h2.yml up -d
• docker compose -f docker-compose-h2.yml down -v
|
Starting ThingWorx Docker
To start ThingWorx Docker:
1. Change directories to the location of your docker-compose.yml file.
2. Open a command prompt and run the docker compose up -d command to build and start your containers.
It is suggested that you use -d in the command to start it as a daemon.
Stopping ThingWorx Docker
To stop ThingWorx Docker:
1. Change directories to the location of your docker-compose.yml file.
2. Open a command prompt and run the docker compose down command to stop your containers and remove volumes:
docker compose down -v
Troubleshooting
ThingWorx Docker provides logs to help you troubleshoot an issue with your Docker instance. Logs are contained within the Docker container itself. The easiest way to access logs is to specify a volume mount for your Docker container's ThingworxStorage and tomcat-logs directories. You can access the logs from the mount points on your local drive.
For example, if your docker-compose.yml looks like this:
• For ThingWorx 9.0 and 9.1:
volumes:
- "./thingworx-storage/shared/ThingworxPlatform:/ThingworxPlatform"
- "./thingworx-storage/platform1/ThingworxStorage:/ThingworxStorage"
- "./thingworx-storage/platform1/ThingworxBackupStorage:/ThingworxBackupStorage"
- "./thingworx-storage/platform1/tomcat-logs:/app/opt/apache-tomcat/logs"
The logs are written to your local system at the following locations:
./thingworx-storage/platform1/ThingworxStorage/logs
./thingworx-storage/platform1/tomcat-logs
• ThingWorx 9.2 and 9.3 and later:
volumes:
- "./thingworx-storage/shared/ThingworxPlatform:/ThingworxPlatform"
- "./thingworx-storage/platform1/ThingworxStorage:/ThingworxStorage"
- "./thingworx-storage/platform1/ThingworxBackupStorage:/ThingworxBackupStorage"
The logs are written to your local system at the following location:
./thingworx-storage/platform1/ThingworxStorage/logs