For an example of how to deploy the application, see knowmetools/km-api-deployment.
The following environment variables can be used to modify the application's behavior.
Note
The application will only attempt to use a Postgres database if all of DJANGO_DB_HOST
, DJANGO_DB_NAME
, DJANGO_DB_PASSWORD
, DJANGO_DB_PORT
, and DJANGO_DB_USER
are set. If any of these settings are not provided, we fall back to a local SQLite database.
Default: ''
A comma separated list of allowed hosts.
Note
This must be set if DJANGO_DEBUG
is set to False
.
Default: https://sandbox.itunes.apple.com/verifyReceipt
The endpoint used to verify subscription receipts from Apple. This can take one of two values:
https://sandbox.itunes.apple.com/verifyReceipt
https://buy.itunes.apple.com/verifyReceipt
Default: us-east-1
The AWS region to use for services such as S3 and SES.
Default: localhost
The hostname of the Postgres database to connect to.
Default: ''
The name of the Postgres database to connect to.
Default:: ''
The password of the user that the application connects to the Postgres database as.
Default: 5432
The port to connect to the Postgres database on.
Default: ''
The name of the user to connect to the Postgres database as.
Default: False
Set to True
(case insensitive) to enable Django's debug mode.
Default: https://example.com/verify/{key}'
The template used to construct links for verifying a user's email address. The {key}
portion of the template will be replaced with a unique token.
Default: False
Set to True
(case insensitive) if the application is served over HTTPS.
Default: False
Set to True
(case insensitive) to store static files in memory. This is mainly used for testing.
Default: ''
The location on the server's filesystem to store user uploaded files at. This setting has no effect when DJANGO_S3_STORAGE
is True
.
Default: https://example.com/reset/{key}
The template used to construct password reset links. The {key}
portion of the template will be replaced with a unique token.
Default: $DJANGO_AWS_REGION
The AWS region that the S3 bucket used to store files is located in. Only takes effect when DJANGO_S3_STORAGE
is True
.
Default: ''
The name of the S3 bucket to store files in. Only takes effect when DJANGO_S3_STORAGE
is True
.
Default: False
Set to True
(case insensitive) to enable storage of static and user uploaded files in an S3 bucket. Requires the following settings to be provided:
DJANGO_S3_BUCKET
Default: secret
Warning
The default value is only used if DJANGO_DEBUG
is set to True
. This is to avoid exposing a known secret key in a production environment.
The secret key that Django uses for a few security operations.
Default: ''
The Data Source Name for the application's Sentry project. If provided logging of warnings and errors to Sentry is enabled.
Default: default
The name of the environment that should be provided as context when logging to Sentry. Only takes effect when DJANGO_SENTRY_DSN
is provided.
Default: $DJANGO_AWS_REGION
The AWS region to send SES emails from. Only takes effect when DJANGO_SES_ENABLED
is True
.
Default: False
Set to True
(case insensitive) to enable sending of emails using AWS SES.
Default: ''
The location on the server's filesystem to store static files at. This setting has no effect when DJANGO_S3_STORAGE
is True
.