# Django Environment Variables
# Copy this file to .envs/.production/.django and fill in values
# ==============================================================================

# General Settings
# ------------------------------------------------------------------------------
USE_DOCKER=yes
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=<generate-a-strong-secret-key>
DJANGO_ALLOWED_HOSTS=.smoothschedule.com,localhost

# IMPORTANT: Set to False in production
DJANGO_DEBUG=False

# Security
# ------------------------------------------------------------------------------
DJANGO_SECURE_SSL_REDIRECT=True
DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS=True
DJANGO_SECURE_HSTS_PRELOAD=True
DJANGO_SECURE_CONTENT_TYPE_NOSNIFF=True

# CORS Configuration
# Set specific origins in production, not all origins
DJANGO_CORS_ALLOWED_ORIGINS=https://smoothschedule.com,https://platform.smoothschedule.com

# Redis
# ------------------------------------------------------------------------------
REDIS_URL=redis://redis:6379/0

# Celery
# ------------------------------------------------------------------------------
CELERY_FLOWER_USER=<random-username>
CELERY_FLOWER_PASSWORD=<random-password>

# Activepieces Integration
# ------------------------------------------------------------------------------
# URL for Activepieces to call SmoothSchedule API (Docker internal network)
SMOOTHSCHEDULE_API_URL=http://django:8000

# These MUST match the values in .activepieces file
AP_FRONTEND_URL=https://automations.smoothschedule.com
AP_INTERNAL_URL=http://activepieces:80
AP_JWT_SECRET=<copy-from-activepieces-file>
AP_ENCRYPTION_KEY=<copy-from-activepieces-file>
AP_DEFAULT_PROJECT_ID=<copy-from-activepieces-file>
AP_PLATFORM_ID=<copy-from-activepieces-file>

# Twilio (for SMS 2FA and phone numbers)
# ------------------------------------------------------------------------------
TWILIO_ACCOUNT_SID=<your-twilio-account-sid>
TWILIO_AUTH_TOKEN=<your-twilio-auth-token>
TWILIO_PHONE_NUMBER=<your-twilio-phone-number>

# Stripe (for payments)
# ------------------------------------------------------------------------------
# Use live keys in production (pk_live_*, sk_live_*)
STRIPE_PUBLISHABLE_KEY=pk_live_<your-stripe-publishable-key>
STRIPE_SECRET_KEY=sk_live_<your-stripe-secret-key>
STRIPE_WEBHOOK_SECRET=whsec_<your-stripe-webhook-secret>

# Mail Server Configuration
# ------------------------------------------------------------------------------
MAIL_SERVER_SSH_HOST=mail.talova.net
MAIL_SERVER_SSH_USER=poduck
MAIL_SERVER_DOCKER_CONTAINER=mailserver
MAIL_SERVER_SSH_KEY_PATH=/app/.ssh/id_ed25519
MAIL_SERVER_SSH_KNOWN_HOSTS_PATH=/app/.ssh/known_hosts

# AWS S3 / DigitalOcean Spaces (for media storage)
# ------------------------------------------------------------------------------
AWS_ACCESS_KEY_ID=<your-spaces-access-key>
AWS_SECRET_ACCESS_KEY=<your-spaces-secret-key>
AWS_STORAGE_BUCKET_NAME=smoothschedule
AWS_S3_REGION_NAME=nyc3
AWS_S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com
