Environment¶
This project uses two canonical runtime settings profiles.
Settings Profiles¶
config.settings.dev: local development and shared dev environmentsconfig.settings.prod: production runtimeconfig.settings.test: test-only profile (kept for faster, deterministic tests)
Compatibility aliases currently exist:
config.settings.local->config.settings.devconfig.settings.production->config.settings.prod
Recommended DJANGO_SETTINGS_MODULE Values¶
- Local development:
config.settings.dev - Shared dev environments (container/preview):
config.settings.dev - Production:
config.settings.prod - Test execution:
config.settings.test
Environment Files¶
Under apps/api/envs/:
dev.env/dev.env.exampleare for development settings.local.env/local.env.exampleare local variants and also use dev settings.prod.env.exampleis for production settings.
When DJANGO_READ_DOT_ENV_FILE is enabled, the settings loader will choose an env file based on the settings module profile.
Quick Examples¶
From apps/api:
export DJANGO_SETTINGS_MODULE=config.settings.dev
export DATABASE_URL=sqlite:////tmp/prismio_local.db
export USE_DOCKER=no
uv run python manage.py runserver
Production-style check (requires prod dependencies and secrets):
Notes¶
config.settings.testremains separate by design to keep tests fast (for example faster password hashers and in-memory email backend).- New references should use
devandprodnames directly. - For static marketing exports, set
CLOUDFLARE_TURNSTILE_SITE_KEYin the CI environment so generated pages render live Turnstile widgets. - For contact form submission from generated marketing pages, set
CLOUDFLARE_CONTACT_WORKER_URLin CI so forms post to the deployed Worker. - Do not inject the Turnstile secret key into Django templates or static site builds. Keep the secret only in your Cloudflare Worker runtime environment and verify tokens server-side there.