Description
If LeadOrbit is deployed without configuring essential environment variables (e.g. missing GEMINI_API_KEY, GOOGLE_CLIENT_ID or database host credentials), the server starts but crashes dynamically when executing features. We need validation checks on startup.
User & Contributor Value
- Contributors: Django settings loading lifecycle, handling early exceptions, and environment testing.
- Users: Prevents deploying misconfigured applications to production.
Code Locations
- backend/backend/wsgi.py
- backend/backend/asgi.py
Implementation Guide
- In
wsgi.py and asgi.py (after django setup), check that crucial settings like GEMINI_API_KEY are not empty.
- If missing, write a clear, bold warning message to stdout detailing which environment variables are missing.
Description
If LeadOrbit is deployed without configuring essential environment variables (e.g. missing
GEMINI_API_KEY,GOOGLE_CLIENT_IDor database host credentials), the server starts but crashes dynamically when executing features. We need validation checks on startup.User & Contributor Value
Code Locations
Implementation Guide
wsgi.pyandasgi.py(after django setup), check that crucial settings likeGEMINI_API_KEYare not empty.