From c414116ed56568c90ec502e56193ea1f23a5c81f Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sun, 2 Aug 2026 05:59:19 +0500 Subject: [PATCH] update env example --- .env.example | 86 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/.env.example b/.env.example index 31b36a2..31a87f9 100644 --- a/.env.example +++ b/.env.example @@ -1,26 +1,76 @@ -CSRF_ALLOWED_HOST="" -DJANGO_DEBUG= +# ============================================================================= +# Django +# ============================================================================= SECRET_KEY="" -POSTGRES_DATABASE= -POSTGRES_USER= -POSTGRES_PASSWORD= -POSTGRES_HOST= -POSTGRES_PORT= -DJANGO_SECURE_SSL_REDIRECT= -ALLOWED_HOSTS="" -CSRF_TRUSTED_ORIGINS="" -CSRF_COOKIE_DOMAIN="" +# DEBUG defaults to True if unset. Set False in production. +DJANGO_DEBUG=True +# Comma-separated. Include the backend service name for the compose network. +ALLOWED_HOSTS="localhost,127.0.0.1,backend" +# --- Only read when DJANGO_DEBUG=False (production) --- +DJANGO_SECURE_SSL_REDIRECT= +SECURE_HSTS_SECONDS= +# Comma-separated absolute origins, e.g. https://portal.sarlink.net +CSRF_TRUSTED_ORIGINS="" + +# ============================================================================= +# Database (PostgreSQL) — matches the `database` service in compose.yml +# ============================================================================= +POSTGRES_DATABASE=sarlink +POSTGRES_USER=sarlink +POSTGRES_PASSWORD=changeme +POSTGRES_HOST=database +POSTGRES_PORT=5432 + +# ============================================================================= +# Redis — currently optional (CACHES is disabled in settings.py) +# ============================================================================= +REDIS_HOST=redis + +# ============================================================================= +# Frontend — used to build links in password-reset emails +# ============================================================================= +FRONTEND_URL="http://localhost:3000" + +# ============================================================================= +# Email / SMTP — password-reset and notification mail +# ============================================================================= EMAIL_HOSTNAME="" EMAIL_PORT= EMAIL_USERNAME= EMAIL_PASSWORD= - -OMADA_PROXY_URL="" -PAYMENT_BASE_URL="" -PERSON_VERIFY_BASE_URL="" -FRONTEND_URL="" - +# ============================================================================= +# SMS gateway — OTP + notifications +# ============================================================================= +SMS_API_URL="" SMS_API_KEY="" -SMS_API_URL="" \ No newline at end of file + +# ============================================================================= +# ID / person verification — GET {PERSON_VERIFY_BASE_URL}/api/person/{id_card} +# ============================================================================= +PERSON_VERIFY_BASE_URL="" + +# ============================================================================= +# MIB payments — POST {PAYMENT_BASE_URL}/verify-payment +# ============================================================================= +PAYMENT_BASE_URL="" + +# ============================================================================= +# Omada (TP-Link) proxy — device access control (block/unblock) +# ============================================================================= +OMADA_PROXY_URL="" +OMADA_PROXY_API_KEY="" +OMADA_SITE_ID="" +OMADA_GROUP_ID="" + +# ============================================================================= +# MAC vendor lookup — REQUIRED, no default: the "add device" flow errors if unset +# ============================================================================= +MACVENDOR_API_URL="" + +# ============================================================================= +# Telegram bot — admin alerts (optional; falls back to no-op if unset) +# ============================================================================= +TG_BOT_TOKEN="" +TG_CHAT_ID=""