3.2 KiB
title
| title |
|---|
| Environment variables |
You may customize the API behaviour thanks to environment variables.
Log level
The API provides structured logging allowing you to have relevant information about what's going on.
If a TTY is attached, the log entries are displayed in text format with colors, otherwise in JSON format.
You may customize the severity of the log entries thanks to the environment variable LOG_LEVEL.
It accepts one of the following severities: "DEBUG", "INFO" (default) and "ERROR".
Default listen port
By default, the API will listen on port 3000.
You may customize this value with the environment variable DEFAULT_LISTEN_PORT.
This environment variable accepts any string that can be turned into a port number.
Disable Google Chrome
In order to save some resources, the Gotenberg image accepts the environment variable DISABLE_GOOGLE_CHROME.
It takes the strings "0" or "1" as value where 1 means true
If Google Chrome is disabled, the following conversions will not be available anymore: HTML, URL and Markdown
Disable LibreOffice (unoconv)
You may also disable LibreOffice (unoconv) with DISABLE_UNOCONV.
If LibreOffice (unoconv) is disabled, the following conversion will not be available anymore: Office
Default wait timeout
By default, the API will wait 10 seconds before it considers the conversion to be unsuccessful.
You may customize this timeout thanks to the environment variable DEFAULT_WAIT_TIMEOUT.
It takes a string representation of a float as value (e.g "2.5" for 2.5 seconds).
The default timeout may also be overridden per request thanks to the form field
waitTimeout. See the timeout section.
Maximum wait timeout
By default, the value of the form field waitTimeout cannot be more than 30 seconds.
You may increase or decrease this limit thanks to the environment variable MAXIMUM_WAIT_TIMEOUT.
It takes a string representation of a float as value (e.g "2.5" for 2.5 seconds).
Default webhook URL timeout
By default, the API will wait 10 seconds before it considers the sending of the resulting PDF to be unsuccessful.
See the webhook section.
You may customize this timeout thanks to the environment variable DEFAULT_WEBHOOK_URL_TIMEOUT.
It takes a string representation of a float as value (e.g "2.5" for 2.5 seconds).
The default timeout may also be overridden per request thanks to the form field
webhookURLTimeout. See the webhook timeout section.
Maximum webhook URL timeout
By default, the value of the form field webhookURLTimeout cannot be more than 30 seconds.
You may increase or decrease this limit thanks to the environment variable MAXIMUM_WEBHOOK_URL_TIMEOUT.
It takes a string representation of a float as value (e.g "2.5" for 2.5 seconds).
Maximum wait delay
By default, the value of the form field waitDelay cannot be more than 10 seconds.
See the wait delay section.
You may increase or decrease this limit thanks to the environment variable MAXIMUM_WAIT_DELAY.
It takes a string representation of a float as value (e.g "2.5" for 2.5 seconds).