Skip to content

Environment variables

Local values live in .env (copied from .env.example). In AWS, non-secret values are set on the ECS task definition and real secrets come from AWS Secrets Manager. See Deployment. Config is read from the environment (12-factor); nothing sensitive is committed.

Variable Default Notes
DJANGO_SETTINGS_MODULE config.settings.local config.settings.prod in AWS (incl. the dev env)
DJANGO_SECRET_KEY insecure-dev-key… Real value from Secrets Manager in prod
DJANGO_DEBUG True (dev) False everywhere else
SITE_DOMAIN localhost Drives ALLOWED_HOSTS / CSRF trusted origins
DJANGO_ADMIN_URL backstage/ Django admin route prefix (leading slash optional)
WAGTAIL_ADMIN_URL studio/ Wagtail admin route prefix
DATABASE_URL (unset → sqlite) e.g. postgres://cslewis:cslewis@localhost:5432/cslewis
REDIS_URL (unset → locmem) e.g. redis://localhost:6379/0
FIREBASE_PROJECT_ID (empty) Firebase project identifier for token validation (see below)
FIREBASE_WEB_API_KEY (empty) Firebase Web API Key for account deletion (see below)
DEV_AUTH_ENABLED same as DEBUG Enables POST /api/auth/dev-login/. Must be off in prod.

Firebase settings

FIREBASE_PROJECT_ID and FIREBASE_WEB_API_KEY are public identifiers (they ship inside every copy of the mobile app), not secrets. They're only needed locally if you want to validate real Firebase ID tokens; without them, use the dev-login escape hatch (DEV_AUTH_ENABLED defaults on when DEBUG=True).

To find the values:

  1. Open the Firebase Console → select the cs-lewis-fueled project.
  2. Click the gear icon (top-left) → Project settingsGeneral tab.
  3. Project ID is near the top (e.g. cs-lewis-fueled).
  4. Web API Key is just below it (starts with AIzaSy…).

Alternatively, download google-services.json from the same page and read project_info.project_id and client[0].api_key[0].current_key.