mirror of
https://github.com/thecyberlearn/hostinger-django-demo.git
synced 2026-08-18 15:12:57 +00:00
- Complete deployment documentation (PRODUCTION_DEPLOYMENT.md) - Automated deployment script (production-deploy.sh) - Systemd service templates (socket + service) - Production settings template with security best practices - Nginx configuration template with performance optimizations - Comprehensive troubleshooting guide - Quick start guide for fast deployment Fixes all issues encountered in initial deployment: - Uses non-root django user for security - Proper /var/www directory structure - Unix socket instead of TCP for better performance - Socket activation with systemd - Correct virtual environment handling - Production security headers and settings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
# Production Environment Variables Template
|
|
# Copy to .env and customize values
|
|
|
|
# Django Core Settings
|
|
SECRET_KEY=your-super-secret-key-generate-a-new-one-for-production
|
|
DEBUG=False
|
|
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com,your-vps-ip
|
|
|
|
# Database Configuration (choose one method)
|
|
|
|
# Method 1: DATABASE_URL (recommended for PostgreSQL)
|
|
# Replace with your actual database credentials
|
|
# DATABASE_URL=postgresql://username:password@localhost:5432/database_name
|
|
|
|
# Method 2: Individual PostgreSQL settings (alternative to DATABASE_URL)
|
|
# DB_ENGINE=django.db.backends.postgresql
|
|
# DB_NAME=your_database_name
|
|
# DB_USER=your_database_user
|
|
# DB_PASSWORD=your_database_password
|
|
# DB_HOST=localhost
|
|
# DB_PORT=5432
|
|
|
|
# Security Settings
|
|
SECURE_SSL_REDIRECT=False # Set to True after SSL certificate is installed
|
|
|
|
# Email Configuration (optional)
|
|
# EMAIL_HOST=smtp.yourmailprovider.com
|
|
# EMAIL_PORT=587
|
|
# EMAIL_USE_TLS=True
|
|
# EMAIL_HOST_USER=your_email@yourdomain.com
|
|
# EMAIL_HOST_PASSWORD=your_email_password
|
|
# DEFAULT_FROM_EMAIL=noreply@yourdomain.com
|
|
|
|
# Cache Configuration (optional - if using Redis)
|
|
# REDIS_URL=redis://127.0.0.1:6379/1
|
|
|
|
# Custom Application Settings
|
|
# Add any custom environment variables your app needs below
|
|
# CUSTOM_API_KEY=your_api_key
|
|
# EXTERNAL_SERVICE_URL=https://api.example.com |