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:
@@ -79,14 +79,20 @@ Add these settings (replace with your actual values):
|
||||
DJANGO_DEBUG=0
|
||||
DJANGO_SECRET_KEY=your-very-long-secret-key-here
|
||||
DJANGO_ALLOWED_HOSTS=your-domain.com,your-server-ip
|
||||
LANGUAGE_CODE=de
|
||||
TIME_ZONE=Europe/Berlin
|
||||
|
||||
# Database Settings
|
||||
POSTGRES_DB=stiftung_prod
|
||||
POSTGRES_USER=stiftung_user
|
||||
POSTGRES_PASSWORD=your-secure-database-password
|
||||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
|
||||
# Redis Settings
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
CELERY_BROKER_URL=redis://redis:6379/0
|
||||
CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
|
||||
# Email Settings (optional)
|
||||
EMAIL_HOST=smtp.your-provider.com
|
||||
@@ -94,6 +100,21 @@ EMAIL_PORT=587
|
||||
EMAIL_HOST_USER=your-email@example.com
|
||||
EMAIL_HOST_PASSWORD=your-email-password
|
||||
EMAIL_USE_TLS=1
|
||||
|
||||
# Paperless-ngx Integration (if you're using Paperless)
|
||||
# PAPERLESS_API_URL=http://your-paperless-server:port
|
||||
# PAPERLESS_API_TOKEN=your-paperless-api-token
|
||||
# PAPERLESS_REQUIRED_TAG=Your_Required_Tag
|
||||
# PAPERLESS_LAND_TAG=Your_Land_Tag
|
||||
# PAPERLESS_ADMIN_TAG=Your_Admin_Tag
|
||||
# PAPERLESS_DESTINATAERE_TAG_ID=123
|
||||
# PAPERLESS_LAND_TAG_ID=456
|
||||
# PAPERLESS_ADMIN_TAG_ID=789
|
||||
|
||||
# Gramps Integration (if you're using GrampsWeb)
|
||||
# GRAMPS_URL=http://your-gramps-server:port
|
||||
# GRAMPS_USERNAME=your-gramps-username
|
||||
# GRAMPS_PASSWORD=your-gramps-password
|
||||
```
|
||||
|
||||
## Step 7: Set Up Production Docker Compose
|
||||
|
||||
Reference in New Issue
Block a user