Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
64 lines (57 loc) · 2.6 KB
/
Copy path.env.example
File metadata and controls
64 lines (57 loc) · 2.6 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
58
59
60
61
62
63
64
# Copy to .env and edit. DEBUG has no default and must be set below. Every
# other value has a working default except in production, where SECRET_KEY,
# ALLOWED_HOSTS, FRONTEND_URL and COOKIE_DOMAIN must also be set.
# See docs/CONFIGURATION.md.
# --- Identity -------------------------------------------------------------
# The only "renaming" this template needs. The Python package stays `config`.
PROJECT_NAME="My Project"
PROJECT_SLUG=myproject
PROJECT_DESCRIPTION="Backend API for My Project"
# --- Core -----------------------------------------------------------------
DEBUG=True
SECRET_KEY=
ALLOWED_HOSTS=localhost,127.0.0.1
# ADMIN_URL=some-hard-to-guess-path/
TIME_ZONE=UTC
LOG_LEVEL=INFO
# --- Frontend + cookies ---------------------------------------------------
# In production these are sibling subdomains of one parent, e.g.
# FRONTEND_URL=https://app.example.com
# ALLOWED_HOSTS=api.example.com
# COOKIE_DOMAIN=.example.com
# The shared parent is what lets a SameSite=Lax session cookie work.
FRONTEND_URL=http://localhost:3000
# CORS_ALLOWED_ORIGINS=https://app.example.com
# CSRF_TRUSTED_ORIGINS=https://app.example.com
# COOKIE_DOMAIN=.example.com
# COOKIE_SAMESITE=Lax
# COOKIE_SECURE=True
# --- Services (both optional in development) ------------------------------
# Unset -> SQLite. Set -> Postgres.
# DATABASE_URL=postgres://user:password@localhost:5432/myproject
# Unset -> in-memory channel layer, local-memory cache, eager Celery.
# REDIS_URL=redis://localhost:6379/0
# --- Signup feature flags -------------------------------------------------
SIGNUP_ENABLED=True
SIGNUP_REQUIRES_ACCESS_CODE=False
# True: the API says "that email exists and uses Google". Friendlier, but it
# confirms account existence to anonymous callers. False only has an effect
# when ACCOUNT_EMAIL_VERIFICATION=mandatory -- `manage.py check` warns if not.
AUTH_DISCLOSE_ACCOUNT_EXISTENCE=True
# --- Google OAuth ---------------------------------------------------------
# Authorised redirect URI to register with Google:
# http://localhost:8000/accounts/google/login/callback/
# https://api.example.com/accounts/google/login/callback/
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# --- Email ----------------------------------------------------------------
# none | optional | mandatory. Google logins are pre-verified regardless.
ACCOUNT_EMAIL_VERIFICATION=none
# Default backend prints mail to the console, so links are clickable in dev.
# EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# EMAIL_HOST=smtp.example.com
# EMAIL_PORT=587
# EMAIL_HOST_USER=
# EMAIL_HOST_PASSWORD=
# EMAIL_USE_TLS=True
DEFAULT_FROM_EMAIL=noreply@localhost