APP_ENV=production
APP_DEBUG=false

# Application keys
APP_KEY={{ vault_app_key }}
ENCRYPTION_KEY={{ vault_encryption_key | default('') }}
STATE_ENCRYPTION_KEY={{ vault_state_encryption_key | default('') }}
JWT_SECRET={{ vault_jwt_secret | default('') }}

# Database
DB_CONNECTION=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_DATABASE=framework_production
DB_USERNAME=framework_user
DB_PASSWORD={{ vault_db_password }}

# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD={{ vault_redis_password }}

# Cache & Session
CACHE_DRIVER=redis
CACHE_PREFIX=framework
SESSION_DRIVER=redis
SESSION_LIFETIME=120

# Mail (optional)
MAIL_MAILER={{ mail_mailer | default('smtp') }}
MAIL_HOST={{ mail_host | default('') }}
MAIL_PORT={{ mail_port | default('587') }}
MAIL_USERNAME={{ mail_username | default('') }}
MAIL_PASSWORD={{ vault_mail_password | default('') }}
MAIL_ENCRYPTION={{ mail_encryption | default('tls') }}
MAIL_FROM_ADDRESS={{ mail_from_address | default('noreply@michaelschiemer.de') }}
MAIL_FROM_NAME={{ mail_from_name | default('Framework') }}

# Rate limiting / security
RATE_LIMIT_ENABLED={{ rate_limit_enabled | default('true') }}
RATE_LIMIT_DEFAULT={{ rate_limit_default | default('60') }}
RATE_LIMIT_WINDOW={{ rate_limit_window | default('60') }}
ADMIN_ALLOWED_IPS={{ admin_allowed_ips | default('127.0.0.1,::1') }}

# App domain
APP_DOMAIN={{ app_domain }}
# Production Environment Configuration
# Generated by Ansible - DO NOT EDIT MANUALLY
# Last Updated: {{ ansible_date_time.iso8601 }}

# Application
APP_NAME={{ app_name }}
APP_ENV=production
APP_DEBUG=false
APP_URL=https://{{ app_domain }}
APP_KEY={{ vault_app_key }}

# Database
DB_CONNECTION=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_DATABASE={{ app_name }}
DB_USERNAME={{ app_name }}
DB_PASSWORD={{ vault_db_password }}

# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD={{ vault_redis_password }}

# Cache
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis

# Security
JWT_SECRET={{ vault_jwt_secret }}
ENCRYPTION_KEY={{ vault_encryption_key | default('') }}
SESSION_SECRET={{ vault_session_secret | default('') }}

# Mail Configuration
MAIL_MAILER=smtp
MAIL_HOST={{ vault_mail_host | default('smtp.example.com') }}
MAIL_PORT={{ vault_mail_port | default('587') }}
MAIL_USERNAME={{ vault_mail_username | default('') }}
MAIL_PASSWORD={{ vault_mail_password }}
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS={{ vault_mail_from | default('noreply@' + app_domain) }}
MAIL_FROM_NAME="{{ app_name }}"

# Logging
LOG_CHANNEL=stack
LOG_LEVEL=warning
LOG_STACK=daily

# Performance
OPCACHE_ENABLE=1
OPCACHE_VALIDATE_TIMESTAMPS=0

# Deployment Info
DEPLOY_VERSION={{ image_tag | default('unknown') }}
DEPLOY_COMMIT={{ git_commit_sha | default('unknown') }}
DEPLOY_TIMESTAMP={{ deployment_timestamp | default(ansible_date_time.iso8601) }}
