# Super Sync Server - Production Environment Configuration
# Copy this file to .env and configure all required values

# =============================================================================
# REQUIRED SETTINGS
# =============================================================================

# Your domain (without https://)
# Caddy will automatically obtain SSL certificates for this domain
DOMAIN=sync.your-domain.com

# JWT secret for authentication tokens (minimum 32 characters)
# Generate with: openssl rand -base64 32
JWT_SECRET=your-secure-jwt-secret-minimum-32-characters

# PostgreSQL password for the database
# Generate with: openssl rand -base64 24
POSTGRES_PASSWORD=your-secure-postgres-password

# =============================================================================
# DATABASE SETTINGS (optional - defaults provided)
# =============================================================================

# PostgreSQL user (default: supersync)
# POSTGRES_USER=supersync

# PostgreSQL database name (default: supersync)
# POSTGRES_DB=supersync

# =============================================================================
# CORS SETTINGS
# =============================================================================

# CORS allowed origins (comma-separated)
# Default: https://app.super-productivity.com
# Add your self-hosted frontend URL if applicable
CORS_ORIGINS=https://app.super-productivity.com

# =============================================================================
# SMTP CONFIGURATION (Required for email verification)
# =============================================================================

# SMTP server hostname
SMTP_HOST=smtp.your-email-provider.com

# SMTP port (default: 587 for TLS, 465 for SSL)
SMTP_PORT=587

# Use SSL/TLS (true for port 465, false for STARTTLS on 587)
SMTP_SECURE=false

# SMTP authentication credentials
SMTP_USER=your-smtp-username
SMTP_PASS=your-smtp-password

# From address for emails
SMTP_FROM="Super Productivity Sync" <noreply@your-domain.com>

# =============================================================================
# CONTAINER REGISTRY (for build-and-push.sh)
# =============================================================================

# GitHub username for GHCR
GHCR_USER=your-github-username

# GitHub token with "Packages: Read and write" permission
# Create at: https://github.com/settings/tokens?type=beta
GHCR_TOKEN=your-github-token

# =============================================================================
# ADVANCED SETTINGS (usually no changes needed)
# =============================================================================

# Log level (info, debug, warn, error)
# LOG_LEVEL=info
