Fix environment variable handling for production deployment

- Update settings.py to support both ALLOWED_HOSTS and DJANGO_ALLOWED_HOSTS
- Add production CSRF_TRUSTED_ORIGINS for vhtv-stiftung.de
- Update env-template.txt with production variable examples
- Improve compatibility between development and production environments
This commit is contained in:
Stiftung Development
2025-09-09 21:02:21 +02:00
parent 0c4b0fd48c
commit edfb233348
15 changed files with 1281 additions and 6 deletions

View File

@@ -9,6 +9,11 @@ DB_PORT=5432
DJANGO_SECRET_KEY=your-secret-key-here-change-in-production
DJANGO_DEBUG=1
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
# Production environment variables (alternative names for Docker Compose)
# SECRET_KEY=your-production-secret-key-here
# ALLOWED_HOSTS=your-domain.com,www.your-domain.com,localhost,127.0.0.1
LANGUAGE_CODE=de
TIME_ZONE=Europe/Berlin