Environment Variables
Overview
SpeedPy uses django-environ for environment variable management. Variables are read from a .env file in the project root.
The Docker setup uses .docker.env as the template (copied to .env during make init).
Variable Reference
Core
| Variable | Type | Default | Description |
|---|---|---|---|
DEBUG | bool | False | Enable debug mode |
SECRET_KEY | string | "change_me" | Django secret key |
SALT_KEY | string | "changeme" | Encryption salt for Fernet encrypted fields |
ALLOWED_HOSTS | list | ["*"] | Comma-separated list of allowed hostnames |
ADMIN_URL | string | "admin/" | URL path for the Django admin |
SITE_URL | string | auto-detected | Full URL of the site (e.g., https://example.com) |
Database
| Variable | Type | Default | Description |
|---|---|---|---|
DATABASE_URL | string | "sqlite:///db.sqlite3" | Database connection string |
CONN_MAX_AGE | int | 60 | Persistent database connection lifetime (seconds, PostgreSQL only) |
Cache
| Variable | Type | Default | Description |
|---|---|---|---|
CACHE_URL | string | "dummycache://" | Cache backend connection string |
Redis & Celery
| Variable | Type | Default | Description |
|---|---|---|---|
REDIS_URL | string | None | Redis URL for Celery broker, result backend, and Redbeat |
Email
| Variable | Type | Default | Description |
|---|---|---|---|
EMAIL_URL | string | "smtp://user:password@localhost:25" | Email backend connection string |
DEFAULT_FROM_EMAIL | string | "admin@example.com" | Default sender address |
AWS_SES_ACCESS_KEY_ID | string | "change_me" | AWS SES access key (if using SES) |
AWS_SES_SECRET_ACCESS_KEY | string | "change_me" | AWS SES secret key (if using SES) |
Static & Media Files
| Variable | Type | Default | Description |
|---|---|---|---|
STATIC_URL | string | "/static/" | URL prefix for static files |
STATIC_ROOT | string | BASE_DIR / "staticfiles" | Directory for collected static files |
MEDIA_ROOT | string | BASE_DIR / "media" | Directory for uploaded media files |
MEDIA_PATH | string | "/media/" | URL prefix for media files |
Authentication & Security
| Variable | Type | Default | Description |
|---|---|---|---|
RECAPTCHA_PUBLIC_KEY | string | "" | Google reCAPTCHA site key |
RECAPTCHA_PRIVATE_KEY | string | "" | Google reCAPTCHA secret key |
RECAPTCHA_REQUIRED_SCORE | float | 0.5 | Minimum reCAPTCHA score (0.0–1.0) |
OTP_TOTP_ISSUER | string | "uptimefor.me" | Name shown in authenticator apps |
TOS_LINK | string | "/" | Terms of Service URL |
DPA_LINK | string | "/" | Privacy Policy URL |
Features
| Variable | Type | Default | Description |
|---|---|---|---|
SPEEDPY_TEAMS_ENABLED | bool | True | Enable/disable teams functionality |
DEMO_MODE | bool | False | Pre-fill login form with demo credentials |
DEFAULT_ADMIN_PASSWORD | string | None | Password for the auto-created superuser |
Docker Default Environment
The .docker.env file used by Docker Compose:
DEBUG=True
DATABASE_URL=postgres://speedpycom:speedpycom@db:5432/speedpycom
REDIS_URL=redis://redis:6379/0
SECRET_KEY=changeme