Environment Variables of Docker Image
You may want to adjust certain settings of the Syncfusion Document Processing API to fit your application. The configuration options can be accessed through environment variables within the container environment. Here are the available options:
Name |
Type |
Description |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SYNCFUSION_LICENSE_KEY |
Required |
To apply license key of the product. To generate a valid license key, refer to this link. |
||||||||||||||||||||
ASPNETCORE_HTTP_PORTS |
Required |
This option determines the port where document processing engine listens for traffic. |
||||||||||||||||||||
PGHOST |
Required |
Postgresql host address. |
||||||||||||||||||||
PGUSER |
Required |
Postgresql user name. |
||||||||||||||||||||
PGPASSWORD |
Required |
Postgresql password. |
||||||||||||||||||||
PGDATABASE |
Required |
Postgresql database name. |
||||||||||||||||||||
PGPORT |
Required |
Postgresql port address. |
||||||||||||||||||||
WORKER_POOL_SIZE |
Optional |
This setting determines the number of concurrent processes initiated for managing document processing tasks.
Default value is 3. The optimal value depends on the memory (RAM), CPU capacity, and the expected workload. Higher resource availability and lighter workloads allow for larger pool sizes, while limited environments or heavy processing (e.g., large files) may require smaller values to prevent CPU and memory exhaustion. Recommended configuration:
It is strongly recommended to monitor system resource usage under real workloads and adjust the WORKER_POOL_SIZE accordingly. |
||||||||||||||||||||
ENABLE_JWT_SECURITY |
Optional |
Enable the JWT authentication. Default value is "false". |
||||||||||||||||||||
JWT_PUBLIC_KEY |
Optional |
This is the public key used to verify the JSON Web Token (JWT) payload signature. Ensure that this public key corresponds to the private key used to generate JWTs in your app. |
||||||||||||||||||||
ENABLE_DELETE_RESOURCE |
Optional |
This enables deletion of job details and both input and generated files. By default, "true". |
||||||||||||||||||||
RESOURCE_EXPIRATION_TIME |
Optional |
The expiration time in minutes is used to delete resources such as job details and other input and generated files after the expiration time. This setting is used only if ENABLE_DELETE_RESOURCE is enabled. By default, the value is "30" minutes. |
Document Storage
The Syncfusion Document Processing Engine offers a feature to save PDFs and other assets. You can store these documents using the provided code in Docker Compose. To persist the documents, you can share a directory from the host machine with the Docker container by including the following in your docker-compose.yml
file. Learn more about Docker volumes.
syncfusion:
volumes:
- ./directory-path-on-the-host:/FileData
Font Configuration
PDF files should appear identical regardless of the PDF viewer used because they can include the necessary fonts for rendering. However, if fonts aren’t embedded, the viewer may rely on system fonts, potentially causing display issues depending on the available fonts. Embedding fonts is the ideal solution, but it may not be feasible, especially with third-party PDFs.
You can expose a directory of fonts from the host machine to the Docker container by adding the following to your docker-compose.yml
file. Learn more about Docker volumes.
syncfusion:
volumes:
- ./directory-path-on-the-host:/usr/local/share/fonts/
NOTE
The Syncfusion Document Processing API is now available as a Docker-based solution. Try it out