S
Sheba ISP ERPDOCS
Getting Started

Environment Variables

Complete specification of all environment variables supported by the backend, worker, and frontend.

Environment Variables Reference

IMPLEMENTED

All configuration settings are loaded via django-environ in backend/sheba_core/settings.py. In local development, values are read from backend/.env. In production, they are injected by Docker / Dokploy.


1. Backend Core & Security Settings

VariableTypeDefault (Local)Production RequirementDescription
ENVIRONMENTstringlocalproductionSwitches security flags (DEBUG, host validation, SSL headers).
DEBUGbooleanTrueFalseEnables verbose error pages. Must be False in production.
SECRET_KEYstringdjango-insecure-...Random 64-char stringDjango cryptographic signing secret.
ALLOWED_HOSTScomma-separated list*api.shebafi.xyz,*.shebafi.xyzPermitted HTTP Host headers.
DATABASE_URLURI stringsqlite:///db.sqlite3postgres://user:pass@host:5432/dbDatabase connection string.
REDIS_URLURI string'' (or redis://localhost:6379/0)redis://redis:6379/0Cache and Celery message broker URI.
LOG_LEVELstringINFOINFO / WARNINGApplication logging verbosity.

2. CORS & CSRF Settings

VariableTypeDefault (Local)Production RequirementDescription
CORS_ALLOW_ALL_ORIGINSbooleanTrueFalseWhen True, permits all domains. Must be False in prod.
CORS_ALLOWED_ORIGINScomma-separated listhttp://localhost:3000https://app.shebafi.xyzWhitelisted frontend origins.
CSRF_TRUSTED_ORIGINScomma-separated list[]https://app.shebafi.xyz,https://api.shebafi.xyzTrusted origins for CSRF checks on mutating requests.

3. Rate Limiting (DRF Throttling)

VariableDefaultDescription
THROTTLE_ANON_RATE100/minuteUnauthenticated public queries (/api/v1/customer/query/)
THROTTLE_USER_RATE1000/minuteAuthenticated staff API interactions
THROTTLE_AUTH_RATE30/minuteLogin endpoints (/api/v1/auth/login/)
THROTTLE_WEBHOOK_RATE300/minuteInbound payment SMS webhooks (/api/v1/payments/sms/webhook/)
THROTTLE_RECHARGE_RATE60/minuteManual or auto subscriber recharge requests

4. Frontend Environment Variables (frontend/.env.local)

VariableDefaultDescription
NEXT_PUBLIC_API_URLhttp://localhost:8000/api/v1Base URL pointing to the Django REST API backend
NEXT_PUBLIC_DEFAULT_TENANT_IDshebafiFallback tenant identifier used during dev testing
PORT3000Frontend web server listening port

On this page