Manage settings and secrets
Where the backend's configuration lives and what each group of settings does.
- 1
Where settings live
All backend settings are environment variables in
/opt/femnet-lms-drf/.env. Keep it out of git, readable only by administrators, and back it up separately. - 2
Core
DJANGO_SECRET_KEY(long and random; never share it),DJANGO_DEBUG=falsein production,DJANGO_ALLOWED_HOSTS,DJANGO_CORS_ALLOWED_ORIGINSandDJANGO_CSRF_TRUSTED_ORIGINS. - 3
Data and jobs
DATABASE_URL,REDIS_URL,CELERY_BROKER_URLandCELERY_RESULT_BACKEND. Media:COURSE_MEDIA_PATH,DJANGO_MEDIA_ROOTandDJANGO_MEDIA_URL. - 4
Email, payments and tokens
Email:
RESEND_API_KEYorDJANGO_EMAIL_*. Shop:SHOP_GATEWAY,PAYSTACK_BASE_URL,PAYSTACK_SECRET_KEYandSHOP_CALLBACK_URL. Sign-in lifetimes:JWT_ACCESS_TOKEN_LIFETIME_MINUTESandJWT_REFRESH_TOKEN_LIFETIME_DAYS. - 5
Apply a change
After editing
.env, rundocker compose up -d --force-recreate drf celery_worker celery_beat.
