Files
stiftung-management-system/env-production.template
Stiftung Development 6282d1a02f Implement session cookie isolation between Django apps
- Added configurable SESSION_COOKIE_NAME and CSRF_COOKIE_NAME to Django settings
- Main app now uses 'stiftung_sessionid' instead of default 'sessionid'
- Paperless continues using default 'sessionid' for separation
- All configuration centralized in .env files as requested
- Updated both development and production compose configurations
- Added session settings to env templates for easy deployment

This resolves the session conflict where logging into one app would
kick out sessions from the other app. Both applications now maintain
independent login sessions.
2025-09-21 22:44:31 +02:00

56 lines
2.2 KiB
Plaintext

# =============================================================================
# PRODUCTION ENVIRONMENT VARIABLES
# =============================================================================
# This template shows the required environment variables for production.
#
# SETUP INSTRUCTIONS:
# 1. SSH into production server: ssh user@your-server-ip
# 2. Navigate to stiftung directory: cd /opt/stiftung
# 3. Copy this template: cp env-production.template .env
# 4. Edit with real values: nano .env
# 5. Set secure permissions: chmod 600 .env
#
# IMPORTANT: Once created, this file will NEVER be overwritten by git deployments!
# The .env file is in .gitignore and will be preserved across all future deployments.
# =============================================================================
# DATABASE CONFIGURATION
POSTGRES_DB=stiftung
POSTGRES_USER=stiftung
POSTGRES_PASSWORD=your_secure_database_password_here
DB_HOST=db
DB_PORT=5432
# DJANGO CONFIGURATION
DJANGO_SECRET_KEY=your_50_character_secret_key_here
DJANGO_DEBUG=False
DJANGO_ALLOWED_HOSTS=www.vhtv-stiftung.de,vhtv-stiftung.de
LANGUAGE_CODE=de-de
TIME_ZONE=Europe/Berlin
# SESSION CONFIGURATION (prevents conflicts between apps)
SESSION_COOKIE_NAME=stiftung_sessionid
CSRF_COOKIE_NAME=stiftung_csrftoken
# REDIS CONFIGURATION
REDIS_URL=redis://redis:6379/0
# PAPERLESS CONFIGURATION
PAPERLESS_API_URL=http://paperless:8000/api
PAPERLESS_API_TOKEN=your_paperless_api_token_here
PAPERLESS_SECRET_KEY=your_paperless_secret_key_here
PAPERLESS_ADMIN_USER=admin
PAPERLESS_ADMIN_PASSWORD=your_paperless_admin_password_here
PAPERLESS_ADMIN_MAIL=admin@vhtv-stiftung.de
# GRAMPS WEB CONFIGURATION
GRAMPSWEB_SECRET_KEY=your_grampsweb_secret_key_here
GRAMPSWEB_ADMIN_EMAIL=admin@vhtv-stiftung.de
GRAMPSWEB_ADMIN_PASSWORD=your_grampsweb_admin_password_here
# =============================================================================
# GENERATE SECRET KEYS:
# =============================================================================
# Django Secret Key: python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
# Paperless Secret: openssl rand -base64 32
# GrampsWeb Secret: openssl rand -base64 32