v4.5 Demo initial commit
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
# ================================================
|
||||
# IoT PreTester V3 - Docker Environment Variables
|
||||
# ================================================
|
||||
# Copy this file to .env and configure your values
|
||||
# Command: cp .env.example .env
|
||||
|
||||
# ==================== GENERAL ====================
|
||||
# Environment mode (production, development)
|
||||
NODE_ENV=production
|
||||
|
||||
# ==================== DJANGO BACKEND ====================
|
||||
# Django Debug Mode (set to False in production!)
|
||||
DEBUG=False
|
||||
|
||||
# Django Secret Key (REQUIRED - generate a secure random key!)
|
||||
# Generate with: python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
|
||||
SECRET_KEY=change-this-to-a-secure-random-secret-key-min-50-chars
|
||||
|
||||
# Allowed Hosts (comma-separated list, use * for all)
|
||||
# Example: localhost,example.com,192.168.1.100
|
||||
ALLOWED_HOSTS=*
|
||||
|
||||
# ==================== CORS CONFIGURATION ====================
|
||||
# CORS Allowed Origins (comma-separated list)
|
||||
# Example: http://localhost:3000,https://frontend.example.com
|
||||
CORS_ALLOWED_ORIGINS=http://localhost:3000
|
||||
|
||||
# ==================== DATABASE ====================
|
||||
# Database path inside container (do not change unless you know what you're doing)
|
||||
DATABASE_PATH=/app/data/db.sqlite3
|
||||
|
||||
# ==================== DJANGO SUPERUSER ====================
|
||||
# Default admin credentials (change these!)
|
||||
DJANGO_SUPERUSER_USERNAME=admin
|
||||
DJANGO_SUPERUSER_EMAIL=admin@example.com
|
||||
DJANGO_SUPERUSER_PASSWORD=change-this-secure-password
|
||||
|
||||
# ==================== INITIALIZATION ====================
|
||||
# Initialize database with default manufacturers/device types
|
||||
# Set to "false" after first run to avoid re-initializing
|
||||
INIT_DATABASE=true
|
||||
|
||||
# ==================== GUNICORN CONFIGURATION ====================
|
||||
# Number of worker processes (adjust based on CPU cores)
|
||||
# Formula: (2 x CPU cores) + 1
|
||||
GUNICORN_WORKERS=4
|
||||
|
||||
# Request timeout in seconds
|
||||
GUNICORN_TIMEOUT=120
|
||||
|
||||
# Logging level (debug, info, warning, error, critical)
|
||||
LOG_LEVEL=info
|
||||
|
||||
# ==================== PORTS ====================
|
||||
# Backend port mapping (host:container)
|
||||
BACKEND_PORT=8000
|
||||
|
||||
# Frontend port mapping (host:container)
|
||||
FRONTEND_PORT=3000
|
||||
|
||||
# ==================== FRONTEND API URL ====================
|
||||
# Backend API URL accessible from frontend
|
||||
# For local development: http://localhost:8000/api
|
||||
# For production: https://your-backend-domain.com/api
|
||||
NEXT_PUBLIC_API_URL=http://localhost:8000/api
|
||||
|
||||
# ==================== OPTIONAL: POSTGRES ====================
|
||||
# Uncomment if using PostgreSQL instead of SQLite
|
||||
|
||||
# POSTGRES_DB=iot_pretester
|
||||
# POSTGRES_USER=iot_user
|
||||
# POSTGRES_PASSWORD=secure_db_password
|
||||
# POSTGRES_HOST=db
|
||||
# POSTGRES_PORT=5432
|
||||
|
||||
# ==================== OPTIONAL: REDIS ====================
|
||||
# Uncomment if using Redis for caching
|
||||
|
||||
# REDIS_HOST=redis
|
||||
# REDIS_PORT=6379
|
||||
# REDIS_PASSWORD=
|
||||
# REDIS_DB=0
|
||||
|
||||
# ==================== SECURITY NOTES ====================
|
||||
# 1. NEVER commit the .env file to version control!
|
||||
# 2. Generate a strong SECRET_KEY for production
|
||||
# 3. Change default admin password immediately
|
||||
# 4. Use strong passwords for all services
|
||||
# 5. Set DEBUG=False in production
|
||||
# 6. Configure specific ALLOWED_HOSTS in production
|
||||
# 7. Use HTTPS in production with proper SSL certificates
|
||||
Reference in New Issue
Block a user