Skip to content

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

VariableDescriptionDefault
DEBUGEnable Django debug mode. Set to False in production.False
DJANGO_SECRET_KEYThe secret key used for cryptographic signing. Keep this secret!Required
ALLOWED_HOSTSList of strings representing the host/domain names that this Django site can serve.["127.0.0.1:8000"]
DATABASE_URLDatabase connection URL (e.g., postgres://user:pass@db:5432/obed).Required
OPENAI_API_KEYAPI Key for OpenAI services (Currently reserved/unused).None

Security

VariableDescriptionDefault
DJANGO_SECURE_SSL_REDIRECTRedirect all non-HTTPS requests to HTTPS.True
DJANGO_SECURE_CONTENT_TYPE_NOSNIFFSets the X-Content-Type-Options: nosniff header.True
XFF_TRUSTED_PROXY_DEPTHNumber of reverse proxies to trust for X-Forwarded-For header.1
TURNSTILE_ENABLEDEnable Cloudflare Turnstile widget.not DEBUG
TURNSTILE_SITE_KEYPublic Site Key for Cloudflare Turnstile.Dummy Key
TURNSTILE_SECRET_KEYSecret Key for Cloudflare Turnstile.Dummy Key

Site Configuration

These settings control the branding and analytics for the site instance.

VariableDescriptionDefault
SITE_NAMEThe display name of the application."EmBC"
SITE_LOCATIONThe physical location/church name."Emmasdale Baptist Church"
SITE_AUTHORThe author name used in meta tags/footer."Emmasdale Baptist Church"
ANALYTICS_SCRIPT_URLURL to the analytics script (e.g., Umami)."https://analytics.umusebo.com/script.js"
ANALYTICS_WEBSITE_IDWebsite ID for the analytics service.None

Notifications & SMS

Configuration for the notification system (Email and SMS).

VariableDescriptionDefault
NOTIFICATION_REMINDER_DAYSComma-separated list of days before due date to send reminders.[3, 7, 14]
DEFAULT_DOMAINDomain used for links in notifications (when Sites framework is unavailable)."embc.cc"
XYNLE_API_KEYAPI Key for Xynle SMS service.None
XYNLE_API_USERNAMEUsername for Xynle SMS service.None
XYNLE_API_SECRETSecret/Password for Xynle SMS service.None
XYNLE_API_SENDER_IDSender ID for SMS messages (e.g., "Obed").None

Email Configuration (Anymail/Mailgun)

Production email settings using Anymail (Mailgun).

VariableDescriptionDefault
MAILGUN_API_KEYAPI Key for Mailgun.None
MAILGUN_DOMAINThe sending domain registered with Mailgun.None
MAILGUN_API_URLMailgun API URL (check your region, e.g., EU vs US)."https://api.eu.mailgun.net/v3"
EMAIL_RECIPIENTSComma-separated list of admin email addresses (for error reporting).None
DEFAULT_FROM_EMAILDefault "From" address for emails.Derived from EMAIL_RECIPIENTS[0]
DJANGO_SERVER_EMAILThe email address that error messages come from.DEFAULT_FROM_EMAIL
DJANGO_EMAIL_SUBJECT_PREFIXSubject 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).

VariableDescriptionDefault
AWS_ACCESS_KEY_IDAccess Key ID.None
AWS_SECRET_ACCESS_KEYSecret Access Key.None
AWS_STORAGE_BUCKET_NAMEName of the S3 bucket.None
AWS_S3_REGION_NAMEAWS/S3 Region Name.None
AWS_S3_ENDPOINT_URLEndpoint URL (required for S3-compatible services like B2).None
AWS_S3_CUSTOM_DOMAINCustom domain for serving files (CDN).None
AWS_S3_FILE_OVERWRITEOverwrite files with the same name?False

Monitoring (Sentry)

Error tracking and performance monitoring.

VariableDescriptionDefault
SENTRY_DSNThe Data Source Name (DSN) for your Sentry project.None
SENTRY_ENVIRONMENTEnvironment tag (e.g., "production", "staging")."production"
DJANGO_SENTRY_LOG_LEVELLogging level for Sentry integration.20 (INFO)
SENTRY_TRACES_SAMPLE_RATEFloat (0.0 to 1.0) controlling performance tracing sample rate.0.0

Caching

VariableDescriptionDefault
REDIS_URLURL for the Redis instance (used for Cache).None
REDIS_KEY_PREFIXPrefix for Redis keys to allow sharing Redis instance.None
CONN_MAX_AGELifetime of a persistent database connection (seconds).60