Environment Variables
This document lists the environment variables used to configure the Obed application. Use this reference when setting up your .env file (local) or configuring production variables.
General Settings
| Variable | Description | Default |
|---|---|---|
DEBUG | Enable Django debug mode. Set to False in production. | False |
DJANGO_SECRET_KEY | The secret key used for cryptographic signing. Keep this secret! | Required |
ALLOWED_HOSTS | List of strings representing the host/domain names that this Django site can serve. | ["127.0.0.1:8000"] |
DATABASE_URL | Database connection URL (e.g., postgres://user:pass@db:5432/obed). | Required |
OPENAI_API_KEY | API Key for OpenAI services (Currently reserved/unused). | None |
Security
| Variable | Description | Default |
|---|---|---|
DJANGO_SECURE_SSL_REDIRECT | Redirect all non-HTTPS requests to HTTPS. | True |
DJANGO_SECURE_CONTENT_TYPE_NOSNIFF | Sets the X-Content-Type-Options: nosniff header. | True |
XFF_TRUSTED_PROXY_DEPTH | Number of reverse proxies to trust for X-Forwarded-For header. | 1 |
TURNSTILE_ENABLED | Enable Cloudflare Turnstile widget. | not DEBUG |
TURNSTILE_SITE_KEY | Public Site Key for Cloudflare Turnstile. | Dummy Key |
TURNSTILE_SECRET_KEY | Secret Key for Cloudflare Turnstile. | Dummy Key |
Site Configuration
These settings control the branding and analytics for the site instance.
| Variable | Description | Default |
|---|---|---|
SITE_NAME | The display name of the application. | "EmBC" |
SITE_LOCATION | The physical location/church name. | "Emmasdale Baptist Church" |
SITE_AUTHOR | The author name used in meta tags/footer. | "Emmasdale Baptist Church" |
ANALYTICS_SCRIPT_URL | URL to the analytics script (e.g., Umami). | "https://analytics.umusebo.com/script.js" |
ANALYTICS_WEBSITE_ID | Website ID for the analytics service. | None |
Notifications & SMS
Configuration for the notification system (Email and SMS).
| Variable | Description | Default |
|---|---|---|
NOTIFICATION_REMINDER_DAYS | Comma-separated list of days before due date to send reminders. | [3, 7, 14] |
DEFAULT_DOMAIN | Domain used for links in notifications (when Sites framework is unavailable). | "embc.cc" |
XYNLE_API_KEY | API Key for Xynle SMS service. | None |
XYNLE_API_USERNAME | Username for Xynle SMS service. | None |
XYNLE_API_SECRET | Secret/Password for Xynle SMS service. | None |
XYNLE_API_SENDER_ID | Sender ID for SMS messages (e.g., "Obed"). | None |
Email Configuration (Anymail/Mailgun)
Production email settings using Anymail (Mailgun).
| Variable | Description | Default |
|---|---|---|
MAILGUN_API_KEY | API Key for Mailgun. | None |
MAILGUN_DOMAIN | The sending domain registered with Mailgun. | None |
MAILGUN_API_URL | Mailgun API URL (check your region, e.g., EU vs US). | "https://api.eu.mailgun.net/v3" |
EMAIL_RECIPIENTS | Comma-separated list of admin email addresses (for error reporting). | None |
DEFAULT_FROM_EMAIL | Default "From" address for emails. | Derived from EMAIL_RECIPIENTS[0] |
DJANGO_SERVER_EMAIL | The email address that error messages come from. | DEFAULT_FROM_EMAIL |
DJANGO_EMAIL_SUBJECT_PREFIX | Subject prefix for email sent to admins/managers. | "[Obed]" |
File Storage (AWS / S3 / B2)
Settings for Storing Static and Media files on S3-compatible storage (e.g. Backblaze B2, AWS S3).
| Variable | Description | Default |
|---|---|---|
AWS_ACCESS_KEY_ID | Access Key ID. | None |
AWS_SECRET_ACCESS_KEY | Secret Access Key. | None |
AWS_STORAGE_BUCKET_NAME | Name of the S3 bucket. | None |
AWS_S3_REGION_NAME | AWS/S3 Region Name. | None |
AWS_S3_ENDPOINT_URL | Endpoint URL (required for S3-compatible services like B2). | None |
AWS_S3_CUSTOM_DOMAIN | Custom domain for serving files (CDN). | None |
AWS_S3_FILE_OVERWRITE | Overwrite files with the same name? | False |
Monitoring (Sentry)
Error tracking and performance monitoring.
| Variable | Description | Default |
|---|---|---|
SENTRY_DSN | The Data Source Name (DSN) for your Sentry project. | None |
SENTRY_ENVIRONMENT | Environment tag (e.g., "production", "staging"). | "production" |
DJANGO_SENTRY_LOG_LEVEL | Logging level for Sentry integration. | 20 (INFO) |
SENTRY_TRACES_SAMPLE_RATE | Float (0.0 to 1.0) controlling performance tracing sample rate. | 0.0 |
Caching
| Variable | Description | Default |
|---|---|---|
REDIS_URL | URL for the Redis instance (used for Cache). | None |
REDIS_KEY_PREFIX | Prefix for Redis keys to allow sharing Redis instance. | None |
CONN_MAX_AGE | Lifetime of a persistent database connection (seconds). | 60 |