-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.production
More file actions
130 lines (103 loc) · 4.51 KB
/
Copy path.env.production
File metadata and controls
130 lines (103 loc) · 4.51 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# PRODUCTION ENVIRONMENT CONFIGURATION
# Copy this file and customize for your production deployment
# For Dokploy: Set these as environment variables in the Dokploy UI
# ========================================
# SECURITY SETTINGS (REQUIRED)
# ========================================
# SECRET_KEY: Django's cryptographic signing key
# - If not set, a random key will be auto-generated on first startup
# - For production, you should set this to a consistent value to persist across restarts
# - Generate with: python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
# SECRET_KEY=your-secret-key-here
# CRITICAL: Disable debug mode in production
DEBUG=False
# REQUIRED: Add your domain(s) here, comma-separated
# Example: yourdomain.com,www.yourdomain.com
ALLOWED_HOSTS=your-domain.com
# ========================================
# DATABASE SETTINGS
# ========================================
DATABASE_NAME=blik
DATABASE_USER=blik
DATABASE_PASSWORD=CHANGE-THIS-TO-SECURE-PASSWORD
DATABASE_HOST=db
DATABASE_PORT=5432
# ========================================
# EMAIL SETTINGS (SMTP)
# ========================================
# Use SMTP backend for production
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# Configure your SMTP server
# Common providers:
# - Gmail: smtp.gmail.com (port 587)
# - SendGrid: smtp.sendgrid.net (port 587)
# - AWS SES: email-smtp.us-east-1.amazonaws.com (port 587)
# - Mailgun: smtp.mailgun.org (port 587)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=noreply@yourdomain.com
# ========================================
# ORGANIZATION SETTINGS
# ========================================
ORGANIZATION_NAME=Your Organization Name
# ========================================
# AUTO-SETUP (OPTIONAL)
# ========================================
# Option 1: Use the setup wizard (recommended for first-time deployment)
# Leave these empty and visit https://yourdomain.com/setup/ after deployment
# Option 2: Auto-create admin user (for automated/scripted deployments)
# Uncomment and set these to skip the setup wizard
# DJANGO_SUPERUSER_USERNAME=admin
# DJANGO_SUPERUSER_EMAIL=admin@yourdomain.com
# DJANGO_SUPERUSER_PASSWORD=CHANGE-THIS-TO-SECURE-PASSWORD
# ========================================
# SECURITY COOKIES (REQUIRED FOR HTTPS)
# ========================================
# CRITICAL: Set to True when using HTTPS (which you should be!)
SESSION_COOKIE_SECURE=True
CSRF_COOKIE_SECURE=True
# ========================================
# CONTAINER PORT CONFIGURATION
# ========================================
# Internal port for main application container
# Default: 8000 (usually no need to change)
PORT=8000
# Internal port for landing/marketing container
# Default: 8001 (usually no need to change)
LANDING_PORT=8001
# Public nginx port (exposed to the internet)
# Default: 80 for HTTP, change to 443 if terminating SSL at nginx
# For cloud platforms (Dokploy, Railway, etc.), they typically:
# - Handle SSL termination at their load balancer
# - Forward HTTP traffic to your container on port 80
# - So you usually keep this as 80
NGINX_PORT=80
# ========================================
# STRIPE PAYMENT SETTINGS (SAAS MODE)
# ========================================
# Get these from Stripe Dashboard > Developers > API keys
# Use test keys (pk_test_..., sk_test_...) for testing
# Use live keys (pk_live_..., sk_live_...) for production
STRIPE_PUBLISHABLE_KEY=pk_test_your_key_here
STRIPE_SECRET_KEY=sk_test_your_key_here
# Get from Stripe Dashboard > Developers > Webhooks
# After creating webhook endpoint at: https://app.yourdomain.com/api/stripe/webhook
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
# Create products in Stripe Dashboard > Products
# Copy the Price ID for each product (starts with price_...)
STRIPE_PRICE_ID_SAAS=price_your_saas_price_id_here
STRIPE_PRICE_ID_ENTERPRISE=price_your_enterprise_price_id_here
# ========================================
# CROSS-APP COMMUNICATION (MULTI-DEPLOYMENT)
# ========================================
# For landing app: URL of the main application API
# Example: https://app.yourdomain.com
MAIN_APP_URL=https://app.yourdomain.com
# For main app: CORS allowed origins (landing page domain)
# If not set, automatically derived from ALLOWED_HOSTS
# Only set this if you need different CORS origins than ALLOWED_HOSTS
# Example: https://yourdomain.com,https://www.yourdomain.com
# CORS_ALLOWED_ORIGINS=https://yourdomain.com