This video follows these Docker instructions hosted on GitHub.
Watch the Video (6 min).
Request a Tornado license key (00:14)
If you haven't done so already, start a Tornado trial here.
Building the Tornado Docker image (00:40)
The first step is to build the Tornado Docker image using the command provided in the setup instructions.
In this example, a local Tornado folder has already been created, along with a templates subfolder. This templates folder will later be mapped to the Docker container so Tornado can source templates from the local computer.
The build is started from PowerShell. Depending on the internet connection and system performance, the build may take several minutes to complete.
Reviewing the Dockerfile (01:13)
The Dockerfile provides an example of how to build an image that runs Tornado. It should be modified later to suit your requirements.
This example builds a Linux container image based on Fedora. It installs the required runtime dependencies, a basic set of fonts, LibreOffice and the Tornado executable.
Inside the Docker container, two folders are created in the Docmosis user directory. One folder is used for templates, and the other is used as the working area for cache and logging.
Some Tornado settings, such as the templates folder and working area, are provided through environment variables. Other settings, including the license key and admin password, are supplied when the container is run.
Tornado is a Java application, and the Dockerfile includes the command used to start Tornado when the container runs.
Customising the run command (02:45)
After the Docker image has been built, the next step is to prepare the command for running the container.
The example Docker run command can be copied from the setup instructions and edited before running it. In this walkthrough, the command is pasted into Notepad so the license key and folder mapping can be updated.
The license key from the trial email is added to the command. The site value is already included in the example.
The command also maps a folder on the local computer to a folder inside the Docker container. This mapping is updated so Tornado can source templates from the local templates folder created earlier.
With this mapping in place, templates can be opened, edited and saved on the local computer, and Tornado will use the updated files.
Starting Tornado (03:50)
Once the run command has been customised, it can be copied into PowerShell and run.
When the command completes, Tornado starts inside the Docker container and listens on port 8080.
Tornado Console (04:05)
The Tornado Console can be opened in a web browser by going to
http://localhost:8080/.
After the console loads, log in using the admin password provided in the run command. The example password should be changed to a password suitable for your own environment.
The Status tab confirms that the Tornado engine is running.
The Configuration tab shows the settings applied from the command line and environment variables, including the license key, templates folder and working area.
The top panel lists the templates available to Tornado. In this example, the templates are being sourced from the local computer through the folder mapping configured earlier.
When Tornado first runs, it creates a samples folder containing the Welcome Template. This template includes simple fields for a date and a message.
Testing document generation (05:08)
With a template selected in the Tornado Console, sample XML or JSON data can be generated from the Data pane.
Tornado queries the selected template, identifies the fields and generates sample values that can be used for testing.
With PDF selected as the output format, the data can be sent to the service to confirm that the engine is working.
The generated document appears in the preview panel on the right, with the sample values merged into the document.
