Web server
SERVER_DNS
- Type: String
- Default: (empty)
- Example:
draftable.yourcompany.com
TLS_CERT
- Type: String (Base64 or file path)
- Default: (empty))
TLS_KEY
- Type: String (Base64 or file path)
- Default: (empty)
TLS_CA_CHAIN
- Type: String (Base64 or file path)
- Default: (empty)
Licensing
DRAFTABLE_PRODUCT_KEY
- Type: String
- Default: (empty)
Compare API
COMPARE_WORKERS_COUNT
- Type: Integer
- Default:
1 - Valid Range: 1 - 10
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.
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 to the bucket:
s3:ListBucket, s3:GetObject, s3:PutObject, s3:DeleteObject
Example IAM policy:
HTTP headers
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