simplified .env configuration with DOMAIN-based defaults and improved docker-compose orchestration

This commit is contained in:
nvrl committed 2026-02-19 18:27:19 +01:00
1 parent 2da6c8e240
commit 8d3e8ebf18
3 files changed
+32 -22

No files matched your search

+12 -12
View File
@@ -1,4 +1,7 @@
# --- Application Security ---
# --- Essential Site Configuration ---
# Your primary domain (e.g., holy.narl.io). Used to derive ALLOWED_HOSTS, CORS, and CSRF settings.
DOMAIN="localhost"
# Set to a long, random string in production (e.g. 50+ chars)
SECRET_KEY="django-insecure-replace-this-in-production"
@@ -8,15 +11,12 @@ DEBUG=true
# Custom URL for the Django Admin interface (e.g., my-secret-admin/)
ADMIN_URL="admin"
# --- Hosting & Networking ---
# The primary domain where your app is hosted (e.g., holy.narl.io)
ALLOWED_HOSTS=localhost,127.0.0.1,backend,holy.narl.io
# CSRF protection: Comma-separated list of trusted origins (MUST start with https:// in production)
CSRF_TRUSTED_ORIGINS=https://holy.narl.io
# CORS protection: Comma-separated list of allowed origins
CORS_ALLOWED_ORIGINS=https://holy.narl.io
# --- Advanced Networking (Optional, derived from DOMAIN if unset) ---
# ALLOWED_HOSTS=holy.narl.io,another-domain.com
# CSRF_TRUSTED_ORIGINS=https://holy.narl.io
# CORS_ALLOWED_ORIGINS=https://holy.narl.io
# FRONTEND_URL=https://holy.narl.io
# VITE_API_URL=https://holy.narl.io/api/
# --- SMTP Configuration (Required for Email Verification) ---
# For development, if EMAIL_HOST is empty, emails are printed to the console.
@@ -32,8 +32,8 @@ EMAIL_HOST_PASSWORD="your-password"
EMAIL_SKIP_CERT_VERIFICATION=false
# --- Frontend Configuration ---
# The base URL of the backend API (MUST end with /api/)
VITE_API_URL=https://holy.narl.io/api/
# Optional: defaults to ${DOMAIN}/api/ if not set
# VITE_API_URL=https://holy.narl.io/api/
VITE_ALLOWED_HOSTS=localhost,holy.narl.io
# --- Impressum / Contact Details (Required for German Law § 5 TMG) ---