|
| 1 | +# Environment Variables for LOCAL TESTING |
| 2 | +# Copy this file to .env.local for local Docker testing |
| 3 | +# Command: cp .env.local.example .env.local |
| 4 | + |
| 5 | +# IMPORTANT: This is for LOCAL TESTING ONLY |
| 6 | +# For production deployment, use .env.example instead |
| 7 | + |
| 8 | +# ============================================================================ |
| 9 | +# Docker Compose Configuration |
| 10 | +# ============================================================================ |
| 11 | + |
| 12 | +# Project name - use different name to avoid conflicts with production |
| 13 | +COMPOSE_PROJECT_NAME=survey-dashboard-local |
| 14 | + |
| 15 | +# ============================================================================ |
| 16 | +# Application Configuration |
| 17 | +# ============================================================================ |
| 18 | + |
| 19 | +# Port the Panel application runs on inside the container |
| 20 | +APP_PORT=5006 |
| 21 | + |
| 22 | +# ============================================================================ |
| 23 | +# Nginx Configuration |
| 24 | +# ============================================================================ |
| 25 | + |
| 26 | +# Port nginx exposes on the host machine |
| 27 | +# Default: 80 for HTTP |
| 28 | +# If port 80 is in use, change to 8080 or another available port |
| 29 | +NGINX_PORT=80 |
| 30 | + |
| 31 | +# Domain name - use localhost for local testing |
| 32 | +# IMPORTANT: HTTPS will NOT work with localhost (Let's Encrypt requires real domains) |
| 33 | +# You can only test HTTP locally |
| 34 | +HOST=localhost |
| 35 | + |
| 36 | +# Path on the domain where the dashboard is accessible |
| 37 | +# Test the same path you'll use in production |
| 38 | +# Example: VIRTUAL_PATH=/2021community |
| 39 | +# Leave empty to serve from root: http://localhost/ |
| 40 | +VIRTUAL_PATH=/2021community |
| 41 | + |
| 42 | +# ============================================================================ |
| 43 | +# SSL/HTTPS Configuration (Let's Encrypt) |
| 44 | +# ============================================================================ |
| 45 | + |
| 46 | +# Dummy email for local testing |
| 47 | +# This is not used when HOST=localhost (Let's Encrypt won't run) |
| 48 | +# In production, use a real email address |
| 49 | +LETSENCRYPT_EMAIL=test@localhost |
| 50 | + |
| 51 | +# ============================================================================ |
| 52 | +# Python Configuration |
| 53 | +# ============================================================================ |
| 54 | + |
| 55 | +# Keep Python output unbuffered for better logging |
| 56 | +PYTHONUNBUFFERED=1 |
| 57 | + |
| 58 | +# ============================================================================ |
| 59 | +# LOCAL TESTING NOTES |
| 60 | +# ============================================================================ |
| 61 | + |
| 62 | +# What works locally: |
| 63 | +# ✅ Docker build and container startup |
| 64 | +# ✅ HTTP access at http://localhost/2021community |
| 65 | +# ✅ Path routing and restrictions |
| 66 | +# ✅ WebSocket connections |
| 67 | +# ✅ Dashboard interactivity |
| 68 | +# ✅ Container restarts and rebuilds |
| 69 | + |
| 70 | +# What does NOT work locally: |
| 71 | +# ❌ HTTPS/SSL certificates (requires real domain) |
| 72 | +# ❌ Let's Encrypt certificate acquisition (localhost is not valid) |
| 73 | +# ❌ External access from internet (only local machine) |
| 74 | + |
| 75 | +# How to test: |
| 76 | +# 1. Copy this file: cp .env.local.example .env.local |
| 77 | +# 2. Start containers: docker-compose --env-file .env.local up -d --build |
| 78 | +# 3. Test in browser: http://localhost/2021community |
| 79 | +# 4. Follow LOCAL_TESTING.md for detailed testing scenarios |
| 80 | + |
| 81 | +# Cleanup after testing: |
| 82 | +# docker-compose --env-file .env.local down |
| 83 | +# docker-compose --env-file .env.local down -v # Remove volumes too |
0 commit comments