Documentation Index
Fetch the complete documentation index at: https://help.draftable.com/llms.txt
Use this file to discover all available pages before exploring further.
Web Server
Application
Licensing
Compare API
Application Security
Database (PostgreSQL)
Redis
AMQP (RabbitMQ)
File Storage
HTTP Headers
X-Frame-Options (iframe embedding)
Logging
Infrastructure Services
Web server
SERVER_DNS
- Type: String
- Default: (empty)
- Example:
draftable.yourcompany.com
TLS_CERT
- Type: String (PEM content)
- Default: (empty)
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines directly into the .env file.
The load balancer container reads certificate content from environment variables and writes it to its internal Nginx SSL paths. You must provide the actual PEM content — file paths are not supported.
TLS_KEY
- Type: String (PEM content)
- Default: (empty)
-----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines directly into the .env file.
TLS_CA_CHAIN
- Type: String (PEM content)
- Default: (empty)
.env file from existing certificate files, you can use:
Application
APP_BASE_URL
- Type: String
- Default:
https://localhost - Example:
https://draftable.yourcompany.com
https://) and port if non-standard. Used for generating links in API responses and the web interface.
ENV
- Type: String
- Default:
prod - Valid Values:
dev,prod
prod for all production and customer deployments.
CSRF_TRUSTED_ORIGINS
- Type: List
- Default: Value of
APP_BASE_URL - Example:
https://draftable.yourcompany.com
APP_BASE_URL) is sufficient. Set explicitly if serving from multiple origins.
APP_MODE
- Type: String
- Valid Values:
web,web_init,celery_worker,celery_beat
web_init runs database migrations and should complete before other containers start.
DEFAULT_FROM_EMAIL
- Type: String
- Default:
draftable@localhost - Example:
noreply@yourcompany.com
Licensing
DRAFTABLE_PRODUCT_KEY
- Type: String
- Default: (empty)
Compare API
COMPARE_API_ACCOUNT_SIGNUP_ENABLED
- Type: Boolean
- Default:
true
COMPARE_API_SOURCE_URL_ALLOW_HTTP
- Type: Boolean
- Default:
false
source_url parameter of comparison requests.
COMPARE_API_SOURCE_URL_ALLOW_PRIVATE_IP
- Type: Boolean
- Default:
false
source_url parameter of comparison requests.
Application security
DJANGO_SECRET_KEY
- Mandatory setting
- Type: String
- Default: (empty)
ALLOWED_HOSTS
- Type: List
- Default: Value of
SERVER_DNS - Example:
draftable.yourcompany.com, www.draftable.yourcompany.com
SERVER_DNS is automatically used.
REQUIRE_HTTPS
- Type: Boolean
- Default:
true
X-Forwarded-Proto HTTP header.
SESSION_COOKIE_AGE
- Type: Integer
- Default:
86400 - Valid Values: >= 0
86400 equal to one day.
SESSION_COOKIE_SAMESITE
- Type: String
- Default:
Lax - Valid Values:
Strict,Lax,None, (empty)
SameSite attribute of session cookies. Consult general online documentation for the behaviours set by the Strict, Lax, and None values. Setting an empty string will result in omitting the SameSite attribute from session cookies, which on modern web browsers is typically equivalent to the Lax setting.
Database (PostgreSQL)
PostgreSQL database connection settings. When using the default Docker Compose configuration, the built-in PostgreSQL container is used and these defaults are sufficient. For Kubernetes deployments or when connecting to an external database (e.g. Amazon RDS), you must configure these variables explicitly.DB_HOST
- Type: String
- Default:
pgsql
The default value
pgsql corresponds to the Docker Compose service name. For Kubernetes or external database deployments, set this to your database hostname (e.g. postgres.internal or your-rds-endpoint.region.rds.amazonaws.com).DB_PORT
- Type: Integer
- Default:
5432 - Valid Range: 1–65535
DB_NAME
- Type: String
- Default:
draftable
DB_USER
- Type: String
- Default:
postgres
DB_PASS
- Type: String
- Default:
password
DB_TLS_MODE
- Type: String
- Default:
prefer - Valid Values:
disable,allow,prefer,require,verify-ca,verify-full
require or higher for production, especially when connecting to a remote or managed database.
DB_CONN_MAX_AGE
- Type: Integer
- Default:
-1 - Valid Values:
-1(unlimited),0(no persistent connections),>0(seconds)
-1 enables unlimited persistent connections, which is appropriate for most deployments.
Redis
Redis is used for caching, session storage, license data, and custom font storage. When using the default Docker Compose configuration, the built-in Redis container is used and these defaults are sufficient. For Kubernetes deployments or when connecting to an external Redis instance (e.g. Amazon ElastiCache), you must configure these variables explicitly.REDIS_HOST
- Type: String
- Default:
redis
The default value
redis corresponds to the Docker Compose service name. For Kubernetes or external Redis deployments, set this to your Redis hostname (e.g. redis.internal or your-elasticache-endpoint.region.cache.amazonaws.com).REDIS_PORT
- Type: Integer
- Default:
6379 - Valid Range: 1–65535
6380 for TLS connections if required by your provider.
REDIS_PASSWORD
- Type: String
- Default: (empty)
REDIS_USER
- Type: String
- Default: (empty)
REDIS_TLS
- Type: Boolean
- Default:
false
true when connecting to managed Redis services that require TLS (e.g. ElastiCache in-transit encryption).
REDIS_DB
- Type: Integer
- Default:
0 - Valid Range: 0–2147483646
AMQP (RabbitMQ)
RabbitMQ is the message broker used for communication between the web application and the comparison engine. When using the default Docker Compose configuration, the built-in RabbitMQ container is used and these defaults are sufficient. For Kubernetes deployments or when connecting to an external RabbitMQ instance (e.g. Amazon MQ), you must configure these variables explicitly.AMQP_HOST
- Type: String
- Default:
rabbitmq
The default value
rabbitmq corresponds to the Docker Compose service name. For Kubernetes or external RabbitMQ deployments, set this to your broker hostname (e.g. rabbitmq.internal or your-amazonmq-endpoint.mq.region.amazonaws.com).AMQP_PORT
- Type: Integer
- Default:
5672 - Valid Range: 1–65535
5671 for TLS connections (e.g. Amazon MQ).
AMQP_USER
- Type: String
- Default:
draftable
AMQP_PASSWORD
- Type: String
- Default:
draftable
AMQP_TLS
- Type: Boolean
- Default:
false
true when connecting to managed RabbitMQ services that require TLS (e.g. Amazon MQ).
File storage
FILE_STORAGE_TYPE
- Type: String
- Default:
local - Valid Values:
local,s3
local
Data is made directly accessible to Draftable containers through the container filesystem. When using the default Docker Compose configuration a Docker volume will be created and mounted into all Draftable containers. Using a Docker volume is not generally compatible with deployments where Draftable containers span multiple servers as the underlying volume will typically not be accessible across discrete hosts.s3
Data is stored in AWS S3 buckets. This storage option is highly scalable and permits usage of Draftable containers across multiple servers due to the separation of the storage backed from compute. The AWS S3 buckets must be configured in advance. Please reach out to Draftable support for details.
DRAFTABLE_API_FILE_STORAGE_ROOT
- Type: String
- Default:
/srv/draftable/data
local storage type. Changing the default is not recommended unless directed by Draftable support for specific advanced scenarios.
To enable S3 storage, the 2 environment variables must be set below:
S3_STORAGE_BUCKET
- Type: String- Default: (empty). Name of the bucket to use. The bucket must be configured with Cross-origin resource sharing (CORS). Below is a minimal JSON example:
AWS_REGION
- Type: String- Default: (empty) AWS region name. Must match the region of the bucket.
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
AWS credentials. The user/role used to access the bucket requires the following permissions:
s3:ListBucket, s3:GetObject, s3:PutObject, s3:DeleteObject
Example IAM policy:
HTTP headers
X-Frame-Options (iframe embedding)
Workaround: override the nginx configuration templateThe load balancer container uses a template file at
/nginx.conf.template which its entrypoint script processes on startup — substituting your SERVER_DNS value and DNS resolver — before writing the final configuration to /etc/nginx/nginx.conf. The workaround below replaces this template so that the entrypoint can still run normally.Extract the nginx configuration template
Extract the template file (not the processed config) from the running container:
Edit the template
Open Change it to one of the following depending on your requirements:
custom-nginx.conf and find this line in the HTTPS server block:- Same-origin embedding (viewer iframe is hosted on the exact same origin as the APISH server):
- Cross-origin embedding (viewer iframe is on a different domain or subdomain to the APISH server):
Remove the
add_header X-Frame-Optionsline entirely.
Mount the custom template
Add a volume mount to the
server service in your docker-compose.yml, mapping your custom file to /nginx.conf.template:Cross-Origin Resource Sharing (CORS)
CORS_ENABLED
- Type: Boolean
- Default:
false
CORS_ALLOWED_ORIGINS
- Type: List
- Default: (empty)
- Example:
https://app.yourcompany.com, https://api.yourcompany.com
CORS_ALLOWED_ORIGIN_REGEXES
- Type: List
- Default: (empty)
- Example:
https://.*\.yourcompany\.com
CORS_ALLOW_ALL_ORIGINS
- Type: Boolean
- Default:
false
Cross-Site Request Forgery (CSRF) protection
CSRF_COOKIE_SAMESITE
- Type: String
- Default:
Strict - Valid Values:
Strict,Lax,None, (empty)
SameSite attribute of CSRF cookies. Consult general online documentation for the behaviours set by the Strict, Lax, and None values. Setting an empty string will result in omitting the SameSite attribute from CSRF cookies, which on modern web browsers is typically equivalent to the Lax setting.
HTTP Strict Transport Security (HSTS)
SECURE_HSTS_SECONDS
- Type: Integer
- Default:
0 - Valid Values: >= 0
max-age attribute of the HSTS header. The default of zero disables the HSTS header, while for production deployments a value of two years (63072000) is recommended.
SECURE_HSTS_INCLUDE_SUBDOMAINS
- Type: Boolean
- Default:
false
includeSubDomains attribute in the HSTS header.
SECURE_HSTS_PRELOAD
- Type: Boolean
- Default:
false - Required: Optional
preload attribute in the HSTS header, indicating that the API Self-hosted domain may be included in the preload list, which is used by all major web browsers. To take effect the SECURE_HSTS_SECONDS value must be at least one year (31536000) and SECURE_HSTS_INCLUDE_SUBDOMAINS must be enabled.
There are additional requirements for inclusion in the preload list; see the submission requirements for full details.
X-Forwarded-Proto
SECURE_PROXY_SSL_HEADER_ENABLED
- Type: Boolean
- Default:
true
X-Forwarded-Proto header on requests sent from the load balancer to web containers and configures the API Self-hosted application to respect the header.
If HTTPS support is enabled via the REQUIRE_HTTPS setting (the default) then the X-Forwarded-Proto header will be implicitly enabled irrespective of the value of this setting.
SECURE_PROXY_SSL_HEADER_NAME
- Type: String
- Default:
HTTP_X_FORWARDED_PROTO
SECURE_PROXY_SSL_HEADER_VALUE
- Type: String
- Default:
https
Logging
Configuration of logging functionality and minimum logging severity levels of components. Changing logging severity levels from the defaults is not recommended unless directed by Draftable support.CONSOLE_LOG_LEVEL
- Type: String
- Default:
WARNING - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
AWS_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
CELERY_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
DJANGO_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
DRAFTABLE_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
GUNICORN_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
MISC_LOG_LEVEL
- Type: String
- Default:
INFO - Valid Values:
CRITICAL,ERROR,WARNING,INFO,DEBUG
LOG_LEVEL setting.
CONSOLE_LOG_TIMESTAMP_ENABLED
- Type: Boolean
- Default:
true
Infrastructure services
These environment variables configure supporting infrastructure services and the document processing pipeline.JODCONVERTER_URL
- Type: String
- Default:
http://converter:8080/lool/convert-to/pdf
http://converter-svc.draftable.svc.cluster.local:8080/lool/convert-to/pdf).
COMPARE_WORKERS_COUNT
- Type: Integer
- Default:
1 - Valid Range: 1–10
HTTP_PORT
- Type: Integer
- Default:
80
HTTPS_PORT
- Type: Integer
- Default:
443