-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
57 lines (47 loc) · 4.39 KB
/
Copy path.env.example
File metadata and controls
57 lines (47 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ══════════════════════════════════════════════════════════════════════════════
# Mahdis — environment variable reference.
#
# Copy the relevant block into the matching file:
# • ROOT → project-root .env (shared / tooling)
# • BACKEND → backend/.env (FastAPI)
# • FRONTEND → frontend/.env.local (Next.js)
#
# 🔴 = MUST change for production
# 🟡 = check / may need different value in production
# ⚪ = safe default
# ══════════════════════════════════════════════════════════════════════════════
# ─── ROOT ─────────────────────────────────────────────────────────────────────
# Consumed by docker compose (compose.yml).
POSTGRES_USER="mahdis" # ⚪
POSTGRES_PASSWORD="mahdis" # 🟡 change for production
POSTGRES_DB="mahdis" # ⚪
# ─── BACKEND ──────────────────────────────────────────────────────────────────
# ── Application ───────────────────────────────────────────────────────────────
PROJECT_NAME="Mahdis API" # ⚪
ENVIRONMENT="development" # 🔴 set "production" for deployment
DEBUG=true # 🔴 set "false" in production
# ── Database (PostgreSQL) ─────────────────────────────────────────────────────
POSTGRES_HOST="localhost" # 🟡 use service name "db" in Docker Compose
POSTGRES_PORT=5433 # 🟡 5432 inside Docker network
POSTGRES_USER="mahdis" # ⚪
POSTGRES_PASSWORD="mahdis" # 🟡 change for production
POSTGRES_DB="mahdis" # ⚪
# Optional full DSN (takes precedence over individual POSTGRES_* vars):
# DATABASE_URL_OVERRIDE="postgresql+asyncpg://user:pass@host:5432/dbname"
# ── Security / JWT ────────────────────────────────────────────────────────────
SECRET_KEY="change-me-to-a-long-random-string" # 🔴 MUST change for production
JWT_ALGORITHM="HS256" # ⚪
ACCESS_TOKEN_EXPIRE_MINUTES=30 # ⚪
REFRESH_TOKEN_EXPIRE_DAYS=30 # ⚪
# ── OTP ───────────────────────────────────────────────────────────────────────
OTP_LENGTH=6 # ⚪
OTP_EXPIRE_MINUTES=5 # ⚪
OTP_MAX_ATTEMPTS=5 # ⚪
OTP_DEBUG_RETURN=true # 🔴 must be "false" in production
FIRST_ADMIN_PHONE="09120000000" # 🔴 REQUIRED — no code fallback. Phone that gets admin on first login.
# ── CORS ──────────────────────────────────────────────────────────────────────
CORS_ORIGINS=["http://localhost:3000"] # 🔴 must be your real domain in production
# ── Seeding ───────────────────────────────────────────────────────────────────
SEED_ON_STARTUP=true # 🔴 set "false" in production
# ─── FRONTEND ─────────────────────────────────────────────────────────────────
NEXT_PUBLIC_API_URL="http://localhost/api" # 🔴 must be your real API URL in production