This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.template
More file actions
100 lines (83 loc) · 3.37 KB
/
.env.template
File metadata and controls
100 lines (83 loc) · 3.37 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# 🌍 LogBlog Environment Variables Template
# Copy this file to backend/.env for local development
# For production on Render, set these as environment variables in the dashboard
# ===========================================
# 🔧 LOCAL DEVELOPMENT CONFIGURATION
# ===========================================
# Use these settings for local development
# Django Security
SECRET_KEY=django-insecure-local-development-key-change-this-in-production-please-make-it-unique
# Debug Mode (True for development, False for production)
DEBUG=True
# Database Configuration
# For local development, use SQLite (no setup required)
DATABASE_URL=sqlite:///db.sqlite3
# OpenAI Configuration (required for AI tutorial features)
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-proj-your-openai-api-key-here-replace-with-real-key
# Frontend URL (where your React app runs locally)
FRONTEND_URL=http://localhost:5174
# Allowed Hosts (domains that can access your Django app)
ALLOWED_HOSTS=localhost,127.0.0.1,*
# ===========================================
# 🚀 PRODUCTION CONFIGURATION EXAMPLE
# ===========================================
# Use these settings in Render dashboard environment variables
# DO NOT put production secrets in this file!
# Production Django Security (generate a strong key!)
# SECRET_KEY=your-super-secure-production-key-at-least-50-characters-long-use-generator
# Production Debug (always False in production!)
# DEBUG=False
# Production Database (PostgreSQL from Render)
# DATABASE_URL=postgresql://logblog_user:password@dpg-xxxxx-a.oregon-postgres.render.com/logblog_db
# Production OpenAI API Key (same as development)
# OPENAI_API_KEY=sk-proj-your-real-openai-api-key-here
# Production Frontend URL (your deployed app domain)
# FRONTEND_URL=https://my-awesome-logblog.onrender.com
# Production Allowed Hosts (your actual domain)
# ALLOWED_HOSTS=my-awesome-logblog.onrender.com,localhost,127.0.0.1
# ===========================================
# 📝 EXAMPLE DOMAIN NAMES
# ===========================================
# If you don't want to think of names, here are some examples:
#
# App Names (choose one for your Render service):
# - logblog-central
# - my-blog-platform
# - awesome-blog-app
# - techblog-platform
# - blog-and-tutorials
# - smart-blog-hub
# - logblog-pro
# - modern-blog-app
#
# Your URLs would then be:
# - https://logblog-central.onrender.com
# - https://my-blog-platform.onrender.com
# - https://awesome-blog-app.onrender.com
# etc.
# ===========================================
# 🔑 HOW TO GET API KEYS
# ===========================================
#
# OpenAI API Key:
# 1. Go to https://platform.openai.com/
# 2. Sign up/login to your account
# 3. Go to API Keys section
# 4. Create a new secret key
# 5. Copy the key (starts with sk-proj-...)
# 6. Add it to your environment variables
#
# Django Secret Key:
# For production, generate a secure key using:
# python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
# ===========================================
# 🛡️ SECURITY NOTES
# ===========================================
#
# 1. NEVER commit .env files to git
# 2. Use different SECRET_KEY for production
# 3. Always set DEBUG=False in production
# 4. Restrict ALLOWED_HOSTS in production
# 5. Keep your OpenAI API key secure
# 6. Use environment variables in production (Render dashboard)