Docker Image Hosting Guide
We aim to assist developers in reducing deployment time and simplifying the publishing process using Docker images. The Syncfusion Document Processing API is available as a ready-to-use Docker image for document processing APIs that ensures a seamless experience for Docker users. The following sections will guide you on how to run Docker commands or configure a YAML file for use with Docker Compose.
Deployment requirement
Hardware requirement
The following hardware requirements are necessary to run document processing API
- Operating system - use document processing api Docker int the following operating system
- Linux
- Windows
- MAC
- CPU: 2-core
- Memory: 8GB RAM
- Disk space: 8GB or more
Software requirements
The following software requirements are necessary to run document processing API
- Database: PostgreSQL
- Application: Docker and Docker Compose.
- Web Browser: Microsoft Edge, Mozilla Firefox, and Chrome.
Steps to configure and run docker container
Step1: Create a docker-compose.yml file with the following configuration, to customize the configuration refer the below link.
Environment variables of docker image.
NOTE
The Document Processing API uses Syncfusion’s Essential Studio and requires a valid license key for use in a production environment. To add your valid license key, set the SYNCFUSION_LICENSE_KEY environment variable in the docker-compose.yml file. To generate a valid license key, refer to this link.
If the license key is not applied, a watermark will be added to the generated PDF documents. The license key is version specific. If you are upgrading the Docker image, you need to update the license key to match the new version.
networks:
network:
driver: bridge
services:
syncfusion.api:
container_name: document_processing
image: syncfusion/document-processing-apis:latest
environment:
- SYNCFUSION_LICENSE_KEY= {Your key here}
- ASPNETCORE_HTTP_PORTS=8080
- PGHOST=database
- PGUSER=postgres
- PGPASSWORD=postgres
- PGDATABASE=documentprocessing
- PGPORT=5432
depends_on:
- database
networks:
- network
volumes:
- ./storage:/FileData
- ./fonts:/usr/local/share/fonts/
ports:
- "8003:8080"
database:
container_name: database
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=documentprocessing
volumes:
- ./.containers/products-db:/var/lib/postgresql/data
networks:
- network
ports:
- "5432:5432"
Step2: Run the command below, this command will start the document processing service and Postgres SQL containers and display the logs.
docker-compose up -d
Step3: After successfully running the server, you’ll encounter the following message upon opening the host URL in your browser http://localhost:8003/