-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.env.digitalocean.template
More file actions
168 lines (130 loc) · 4.84 KB
/
Copy path.env.digitalocean.template
File metadata and controls
168 lines (130 loc) · 4.84 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# DigitalOcean Environment Variables Template
# Copy this file to .env.production and fill in your values
#
# For App Platform: Set these as environment variables in the DO dashboard
# For Droplet: Use this file with docker-compose.production.yml
# ====================
# Django Configuration
# ====================
DEBUG=False
# Your domain(s) - comma-separated
# App Platform: Use ${APP_DOMAIN} (auto-provided)
# Droplet: Use your actual domain(s)
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
# Trusted origins for CSRF - space-separated for App Platform, comma-separated for Droplet
# App Platform: https://${APP_DOMAIN}
# Droplet: https://yourdomain.com,https://www.yourdomain.com
CSRF_TRUSTED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# ====================
# Security Keys (REQUIRED)
# ====================
# 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-generate-a-new-one
# Generate with: python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'
ENCRYPTION_KEY=your-encryption-key-here-generate-a-new-one
# ====================
# Database Configuration
# ====================
# App Platform: Use ${db.DATABASE_URL} (auto-provided when database is attached)
# Droplet: Configure individual settings below
DATABASE_TYPE=postgres
# Droplet only (comment out for App Platform):
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_NAME=blik
DATABASE_USER=blik
DATABASE_PASSWORD=your-secure-database-password-here
# Alternative: Use DATABASE_URL instead of individual settings
# DATABASE_URL=postgres://user:password@host:port/dbname
# ====================
# SSL/Security
# ====================
SESSION_COOKIE_SECURE=True
CSRF_COOKIE_SECURE=True
SECURE_SSL_REDIRECT=True
SECURE_HSTS_SECONDS=31536000
SECURE_HSTS_INCLUDE_SUBDOMAINS=True
# ====================
# Organization
# ====================
# Default organization name (can be changed via /setup/ wizard)
ORGANIZATION_NAME=My Organization
# ====================
# Email Configuration (REQUIRED)
# ====================
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# Gmail example:
# EMAIL_HOST=smtp.gmail.com
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=your-email@gmail.com
# EMAIL_HOST_PASSWORD=your-app-specific-password
# SendGrid example:
# EMAIL_HOST=smtp.sendgrid.net
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=apikey
# EMAIL_HOST_PASSWORD=your-sendgrid-api-key
# Amazon SES example:
# EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
# EMAIL_PORT=587
# EMAIL_USE_TLS=True
# EMAIL_HOST_USER=your-ses-smtp-username
# EMAIL_HOST_PASSWORD=your-ses-smtp-password
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@example.com
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=noreply@yourdomain.com
# ====================
# Stripe Configuration (Optional)
# ====================
# Only needed if you're using the subscription features
# Get these from: https://dashboard.stripe.com/apikeys
# STRIPE_PUBLISHABLE_KEY=pk_live_xxx
# STRIPE_SECRET_KEY=sk_live_xxx
# STRIPE_WEBHOOK_SECRET=whsec_xxx
# Price IDs from Stripe (create products first)
# STRIPE_PRICE_ID_SAAS=price_xxx
# STRIPE_PRICE_ID_ENTERPRISE=price_xxx
# ====================
# Superuser Configuration (Optional)
# ====================
# The installation wizard at /setup/ will create the first admin user
# If you prefer to create a superuser via environment variables:
# DJANGO_SUPERUSER_USERNAME=admin
# DJANGO_SUPERUSER_EMAIL=admin@example.com
# DJANGO_SUPERUSER_PASSWORD=secure-password-here
# ====================
# Additional Settings (Optional)
# ====================
# Time zone
# TZ=UTC
# Language
# LANGUAGE_CODE=en-us
# File upload size limit (in MB)
# DATA_UPLOAD_MAX_MEMORY_SIZE=10485760 # 10MB
# ====================
# DigitalOcean Spaces (Optional)
# ====================
# Only needed if you want to use DO Spaces for media file storage
# This is recommended for App Platform (ephemeral filesystem)
# Not required for Droplet with local volumes
# USE_SPACES=False
# AWS_ACCESS_KEY_ID=your-spaces-access-key
# AWS_SECRET_ACCESS_KEY=your-spaces-secret-key
# AWS_STORAGE_BUCKET_NAME=your-space-name
# AWS_S3_REGION_NAME=nyc3
# AWS_S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com
# ====================
# Production Best Practices
# ====================
# 1. Never commit this file with real values to version control
# 2. Use strong, unique passwords for SECRET_KEY, ENCRYPTION_KEY, and DATABASE_PASSWORD
# 3. Use app-specific passwords for email (not your main password)
# 4. For App Platform, set these as SECRET type environment variables in the DO dashboard
# 5. For Droplet, protect this file: chmod 600 .env.production
# 6. Regularly rotate your secrets
# 7. Use HTTPS in production (SECURE_SSL_REDIRECT=True)
# 8. Keep DEBUG=False in production