This tutorial shows how to use a Docker Compose file to run LEADVIEW and the Document Service at the same time.
|This tutorial covers how to use LEADVIEW and Document Service with Docker Compose.
|Visual Studio Project
|Download tutorial project (49 MB)
|Visual Studio 2017, 2019
Before working on the How to use LEADVIEW and Document Service with Docker Compose tutorial, complete the following tutorials:
In order to complete this project, you will need to install LEADTOOLS and Docker.
The first step is to create a new folder. In that folder put the Document Service and the LEADVIEW Document Viewer.
The next step is to create a new file called
docker-compose.yml. This file will contain all of the instructions that Docker needs to run the two projects. This requires that the two projects already have Docker files containing the instructions to build their own Docker image as covered in the Set up Document Service with Docker Tutorial and the Containerize LEADVIEW with Docker Tutorial. Docker Compose allows you to run the two containers simultaneously.
docker-compose.yml file add the following code:
# Build services
# Name of container (must be lowercase)
# File path to project
# Map container ports to localhost
docker-compose.yml file is complete, the containers are ready to be built. Open up the Terminal and navigate to the folder containing this project. Run the command:
This will build both of the projects housed in this folder. Docker will look into both projects and build the containers using their Docker file instructions.
It may take a couple minutes for the project to complete building. Once it is complete the containers will be ready to run.
Once the Docker containers are ready to run, use the following command:
You should see both containers running.
http://localhost:30000 to see the Document Service.
http://localhost:5000 to see LEADVIEW.
In this tutorial, we covered how to run two Docker Containers simultaneously using Docker Compose. One container used the LEADTOOLS Document Service, and the other used the LEADVIEW Document Viewer.