Required Variables
These environment variables must be set for the application to run.Environment name for the application. Used purely for logging purposes and should not be used for logical conditionals in code.Supported values:
development- Loads Development config classtest- Loads Test config class- Any other value loads the base Config class
app/config.py:16, app/__init__.py:56API Configuration
Hostname for the Notify API service.Default (Development):
http://localhost:6011Default (Test): http://test-notify-apiSource: app/config.py:9, app/config.py:29Public hostname for the Document Download API service.Default (Development):
http://localhost:7000Default (Test): https://download.test-doc-download-api.gov.ukSource: app/config.py:20, app/config.py:30Internal hostname for the Document Download API service. Used for server-to-server communication.Default (Development): Falls back to
DOCUMENT_DOWNLOAD_API_HOST_NAME value (http://localhost:7000)Default (Test): https://download.test-doc-download-api-internal.gov.ukSource: app/config.py:21, app/config.py:31-33Security & Authentication
Secret key for Flask session signing and CSRF protection.Development default:
dev-notify-secret-keySource: app/config.py:7, app/config.py:36Secret key for authenticating with the admin client.Development default:
dev-notify-secret-keySource: app/config.py:5, app/config.py:35Logging
Log level for request logging.Supported values:
DEBUG, INFO, WARNING, ERROR, CRITICALSource: app/config.py:18UI Customization
Hex color code for the application header.Default is
#FFBF47 (yellow from GOV.UK design system).Source: app/config.py:23HTTP protocol to use for generated URLs.Supported values:
http, httpsSource: app/config.py:24Server Configuration
Server name for the Flask application. Used for URL generation.Test default:
document-download-frontend.govOnly required in specific environments (development and test).Source: app/config.py:28, app/config.py:46Timeout in seconds for HTTP request serving. Used by both the eventlet middleware and gunicorn.Source:
application.py:28, gunicorn_config.py:12Performance Monitoring (Sentry)
These variables control Sentry error and performance monitoring.Enable or disable Sentry monitoring.Set to
1 to enable, 0 to disable.Source: app/performance.py:15Sentry Data Source Name (DSN) for the project.Required when
SENTRY_ENABLED=1.Source: app/performance.py:16Allow Sentry to collect Personally Identifiable Information (PII).Set to
1 to enable, 0 to disable.When enabled:send_default_piiis set toTruerequest_bodiesis set tomedium
app/performance.py:14, app/performance.py:24-25Sample rate for error events sent to Sentry.Value between
0.0 (0%) and 1.0 (100%).Source: app/performance.py:21Sample rate for performance traces sent to Sentry.Value between
0.0 (0%) and 1.0 (100%).Source: app/performance.py:22Test Configuration
These variables are used in the Test configuration class.Enable Flask testing mode.Test default:
TrueSource: app/config.py:42Enable CSRF protection for Flask-WTF forms.Test default:
False (disabled for testing)Source: app/config.py:43