# fly.toml app configuration file generated for confab on 2025-11-16T22:38:33-08:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # app = 'confab' primary_region = 'sjc' [build] # Process definitions - app runs the HTTP server, worker runs background precompute [processes] app = "./confab" worker = "./confab worker" # Non-secret environment variables [env] # Static file serving (enables frontend) STATIC_FILES_DIR = "/app/static" # Frontend/Backend URLs (update if using custom domain) FRONTEND_URL = "https://code.confabulous.dev" BACKEND_URL = "https://code.confabulous.dev" ALLOWED_ORIGINS = "https://code.confabulous.dev,https://confabulous.dev" GITHUB_REDIRECT_URL = "https://code.confabulous.dev/auth/github/callback" GOOGLE_REDIRECT_URL = "https://code.confabulous.dev/auth/google/callback" # Trust only Fly.io's edge header for client IP. The Fly proxy always sets and # strips Fly-Client-IP, so other proxy headers (CF-Connecting-IP, X-Real-IP, # X-Forwarded-For, ...) cannot be spoofed to bypass IP-based rate limits. TRUSTED_PROXY_HEADERS = "Fly-Client-IP" # Database Connection Pool (8e09: let Neon compute autosuspend between # worker poll ticks instead of holding it awake 24/7) DB_CONN_MAX_IDLE_TIME = "1m" # S3/Tigris Configuration (Fly Object Storage) # Note: Fly secrets already set: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, BUCKET_NAME # Note: S3_ENDPOINT should NOT include protocol (http:// or https://) S3_ENDPOINT = "fly.storage.tigris.dev" S3_USE_SSL = "true" # Email Configuration (required - for share invitations) # Note: RESEND_API_KEY must be set as a Fly secret: fly secrets set RESEND_API_KEY=re_xxx # EMAIL_FROM_ADDRESS must match a verified domain in Resend EMAIL_FROM_NAME = "Confabulous Code" EMAIL_FROM_ADDRESS = "noreply@share.confabulous.dev" # Update this to match your verified Resend domain EMAIL_RATE_LIMIT_PER_HOUR = "100" # Support email shown in UI for help requests and account deletion SUPPORT_EMAIL = "help@confabulous.dev" # SaaS features (off by default for self-hosted) ENABLE_SHARE_CREATION = "true" ENABLE_SAAS_FOOTER = "true" # Admin Configuration SUPER_ADMIN_EMAILS = "swe@confabulous.dev" # Smart Recap Configuration (AI-powered session analysis) # Note: OPENAI_API_KEY must be set as a Fly secret: # fly secrets set OPENAI_API_KEY=sk-xxx # (ANTHROPIC_API_KEY is only needed when SMART_RECAP_LLM_PROVIDER is "anthropic".) SMART_RECAP_ENABLED = "true" SMART_RECAP_LLM_PROVIDER = "openai" SMART_RECAP_MODEL = "gpt-6-luna" SMART_RECAP_QUOTA_LIMIT = "500" # Per-user monthly cap (0 = unlimited) SMART_RECAP_MAX_OUTPUT_TOKENS = "1000" SMART_RECAP_MAX_TRANSCRIPT_TOKENS = "50000" # Worker Configuration (background analytics precompute) # 30m (> Neon's 5-min autosuspend delay) so the worker alone doesn't keep # compute awake 24/7; 50 per cycle keeps backlog drain at ~100/hr. WORKER_POLL_INTERVAL = "30m" WORKER_MAX_SESSIONS = "50" # Required: max sessions per iteration WORKER_DRY_RUN = "false" WORKER_RECAP_BASE_MIN_LINES = "150" WORKER_RECAP_BASE_MIN_TIME = "30m" WORKER_RECAP_MIN_INITIAL_LINES = "25" [http_service] internal_port = 8080 force_https = true auto_stop_machines = 'stop' auto_start_machines = true min_machines_running = 1 processes = ['app'] [[vm]] memory = '512mb' cpu_kind = 'shared' cpus = 1 processes = ['app'] # Worker VM - always running singleton for background precompute [[vm]] memory = '512mb' cpu_kind = 'shared' cpus = 1 processes = ['worker']