Skip to content
FEMNET

Manage settings and secrets

Where the backend's configuration lives and what each group of settings does.

IT teamDone in: Server5 steps
  1. 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. 2

    Core

    DJANGO_SECRET_KEY (long and random; never share it), DJANGO_DEBUG=false in production, DJANGO_ALLOWED_HOSTS, DJANGO_CORS_ALLOWED_ORIGINS and DJANGO_CSRF_TRUSTED_ORIGINS.

  3. 3

    Data and jobs

    DATABASE_URL, REDIS_URL, CELERY_BROKER_URL and CELERY_RESULT_BACKEND. Media: COURSE_MEDIA_PATH, DJANGO_MEDIA_ROOT and DJANGO_MEDIA_URL.

  4. 4

    Email, payments and tokens

    Email: RESEND_API_KEY or DJANGO_EMAIL_*. Shop: SHOP_GATEWAY, PAYSTACK_BASE_URL, PAYSTACK_SECRET_KEY and SHOP_CALLBACK_URL. Sign-in lifetimes: JWT_ACCESS_TOKEN_LIFETIME_MINUTES and JWT_REFRESH_TOKEN_LIFETIME_DAYS.

  5. 5

    Apply a change

    After editing .env, run docker compose up -d --force-recreate drf celery_worker celery_beat.

Related how-tos