# OpenDistillery Environment Configuration
# Copy this file to .env and configure for your environment

# =============================================================================
# ENVIRONMENT SETTINGS
# =============================================================================
OPENDISTILLERY_ENV=production
OPENDISTILLERY_DEBUG=false

# =============================================================================
# API CONFIGURATION
# =============================================================================
OPENDISTILLERY_API_HOST=0.0.0.0
OPENDISTILLERY_API_PORT=8000
OPENDISTILLERY_WORKER_PROCESSES=4

# =============================================================================
# SECURITY CONFIGURATION
# =============================================================================
# CRITICAL: Change this secret key in production!
OPENDISTILLERY_SECRET_KEY=your-super-secret-key-here-change-in-production

# Multi-Factor Authentication
OPENDISTILLERY_REQUIRE_MFA=false

# Rate Limiting
OPENDISTILLERY_RATE_LIMIT_ENABLED=true
OPENDISTILLERY_RATE_LIMIT_PER_MINUTE=100

# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_NAME=opendistillery
DATABASE_USER=opendistillery
DATABASE_PASSWORD=your-database-password-here

# Connection Pool Settings
DATABASE_MIN_CONNECTIONS=5
DATABASE_MAX_CONNECTIONS=20
DATABASE_SSL_MODE=require

# =============================================================================
# REDIS CONFIGURATION
# =============================================================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your-redis-password-here
REDIS_DB=0
REDIS_SSL=false

# =============================================================================
# AI MODEL PROVIDERS
# =============================================================================

# OpenAI Configuration
OPENAI_API_KEY=your-openai-api-key-here
OPENAI_ORG_ID=your-openai-org-id-here
OPENAI_DEFAULT_MODEL=gpt-4

# Anthropic Configuration
ANTHROPIC_API_KEY=your-anthropic-api-key-here
ANTHROPIC_DEFAULT_MODEL=claude-3-opus-20240229

# Google AI Configuration
GOOGLE_AI_API_KEY=your-google-ai-api-key-here
GOOGLE_AI_PROJECT_ID=your-google-project-id

# Azure OpenAI Configuration
AZURE_OPENAI_API_KEY=your-azure-openai-key-here
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_VERSION=2024-02-01

# =============================================================================
# MONITORING & OBSERVABILITY
# =============================================================================

# Prometheus Configuration
PROMETHEUS_ENABLED=true
PROMETHEUS_PORT=9090
PROMETHEUS_METRICS_PATH=/metrics

# Grafana Configuration
GRAFANA_PASSWORD=your-grafana-admin-password

# Elasticsearch Configuration
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=your-elasticsearch-password

# Jaeger Tracing
JAEGER_ENABLED=true
JAEGER_ENDPOINT=http://localhost:14268/api/traces

# =============================================================================
# ENTERPRISE INTEGRATIONS
# =============================================================================

# Salesforce Integration
SALESFORCE_CLIENT_ID=your-salesforce-client-id
SALESFORCE_CLIENT_SECRET=your-salesforce-client-secret
SALESFORCE_USERNAME=your-salesforce-username
SALESFORCE_PASSWORD=your-salesforce-password
SALESFORCE_SECURITY_TOKEN=your-salesforce-security-token
SALESFORCE_SANDBOX=false

# Microsoft 365 Integration
MICROSOFT_CLIENT_ID=your-microsoft-client-id
MICROSOFT_CLIENT_SECRET=your-microsoft-client-secret
MICROSOFT_TENANT_ID=your-microsoft-tenant-id

# SAP Integration
SAP_HOST=your-sap-host
SAP_USERNAME=your-sap-username
SAP_PASSWORD=your-sap-password
SAP_CLIENT=your-sap-client

# =============================================================================
# CLOUD STORAGE
# =============================================================================

# AWS S3 Configuration
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_DEFAULT_REGION=us-east-1
AWS_S3_BUCKET=your-opendistillery-bucket

# Azure Blob Storage
AZURE_STORAGE_ACCOUNT=your-storage-account
AZURE_STORAGE_KEY=your-storage-key
AZURE_STORAGE_CONTAINER=opendistillery

# Google Cloud Storage
GOOGLE_CLOUD_PROJECT=your-gcp-project-id
GOOGLE_CLOUD_STORAGE_BUCKET=your-gcs-bucket

# MinIO (Self-hosted)
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=your-minio-password
MINIO_ENDPOINT=http://localhost:9000

# =============================================================================
# SECRETS MANAGEMENT
# =============================================================================

# HashiCorp Vault
VAULT_ENABLED=false
VAULT_URL=http://localhost:8200
VAULT_ROOT_TOKEN=your-vault-root-token
VAULT_MOUNT_PATH=secret

# =============================================================================
# PERFORMANCE & SCALING
# =============================================================================

# Caching Configuration
CACHE_ENABLED=true
CACHE_TTL_SECONDS=3600
CACHE_MAX_SIZE_MB=512

# Load Balancing
LOAD_BALANCER_ENABLED=true
LOAD_BALANCER_ALGORITHM=round_robin

# Auto-scaling
AUTOSCALING_ENABLED=false
AUTOSCALING_MIN_INSTANCES=2
AUTOSCALING_MAX_INSTANCES=10
AUTOSCALING_TARGET_CPU_PERCENT=70

# =============================================================================
# COMPLIANCE & GOVERNANCE
# =============================================================================

# Data Retention
DATA_RETENTION_DAYS=2555  # 7 years
LOG_RETENTION_DAYS=90

# Audit Logging
AUDIT_LOGGING_ENABLED=true
AUDIT_LOG_LEVEL=INFO

# Data Encryption
ENCRYPTION_AT_REST_ENABLED=true
ENCRYPTION_IN_TRANSIT_ENABLED=true

# =============================================================================
# NOTIFICATION SETTINGS
# =============================================================================

# Email Configuration
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@company.com
SMTP_PASSWORD=your-email-password
SMTP_USE_TLS=true

# Slack Integration
SLACK_WEBHOOK_URL=your-slack-webhook-url
SLACK_CHANNEL=#opendistillery-alerts

# PagerDuty Integration
PAGERDUTY_INTEGRATION_KEY=your-pagerduty-key

# =============================================================================
# DEVELOPMENT & TESTING
# =============================================================================

# Development Mode Settings
DEV_MODE=false
DEV_AUTO_RELOAD=false
DEV_MOCK_EXTERNAL_APIS=false

# Testing Configuration
TEST_DATABASE_URL=postgresql://test_user:test_pass@localhost:5432/test_opendistillery
TEST_REDIS_URL=redis://localhost:6379/1

# =============================================================================
# DOCKER & KUBERNETES
# =============================================================================

# Docker Configuration
DOCKER_REGISTRY=your-registry.com
DOCKER_IMAGE_TAG=latest

# Kubernetes Configuration
KUBERNETES_NAMESPACE=opendistillery
KUBERNETES_SERVICE_ACCOUNT=opendistillery-sa

# =============================================================================
# BACKUP & DISASTER RECOVERY
# =============================================================================

# Backup Configuration
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * *  # Daily at 2 AM
BACKUP_RETENTION_DAYS=30
BACKUP_STORAGE_TYPE=s3  # s3, gcs, azure, local

# Disaster Recovery
DR_ENABLED=false
DR_REGION=us-west-2
DR_RTO_MINUTES=60  # Recovery Time Objective
DR_RPO_MINUTES=15  # Recovery Point Objective 