|
| 1 | +# scribbl-py Environment Configuration |
| 2 | +# Copy this file to .env and update the values |
| 3 | + |
| 4 | +# ============================================================================= |
| 5 | +# Application Settings |
| 6 | +# ============================================================================= |
| 7 | +LITESTAR_APP=scribbl_py.app:app |
| 8 | +DEBUG=true |
| 9 | + |
| 10 | +# ============================================================================= |
| 11 | +# Database Configuration |
| 12 | +# ============================================================================= |
| 13 | +# SQLite (default - good for development) |
| 14 | +DATABASE_URL=sqlite+aiosqlite:///./scribbl.db |
| 15 | + |
| 16 | +# PostgreSQL (recommended for production) |
| 17 | +# DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/scribbl |
| 18 | + |
| 19 | +# ============================================================================= |
| 20 | +# OAuth Providers (optional - for user authentication) |
| 21 | +# ============================================================================= |
| 22 | +# BASE_URL is used to construct OAuth callback URLs for ALL providers: |
| 23 | +# {BASE_URL}/auth/discord/callback |
| 24 | +# {BASE_URL}/auth/google/callback |
| 25 | +# {BASE_URL}/auth/github/callback |
| 26 | +# |
| 27 | +# For local development, leave unset (defaults to http://localhost:8000) |
| 28 | +# For production, set to your domain (e.g., https://scribble.scriptr.dev) |
| 29 | +BASE_URL=http://localhost:8000 |
| 30 | + |
| 31 | +# Google OAuth |
| 32 | +# Get credentials at: https://console.cloud.google.com/apis/credentials |
| 33 | +# Add redirect URI: {BASE_URL}/auth/google/callback |
| 34 | +GOOGLE_CLIENT_ID= |
| 35 | +GOOGLE_CLIENT_SECRET= |
| 36 | + |
| 37 | +# Discord OAuth |
| 38 | +# Get credentials at: https://discord.com/developers/applications |
| 39 | +# Add redirect URI: {BASE_URL}/auth/discord/callback |
| 40 | +DISCORD_CLIENT_ID= |
| 41 | +DISCORD_CLIENT_SECRET= |
| 42 | + |
| 43 | +# GitHub OAuth |
| 44 | +# Get credentials at: https://github.com/settings/developers |
| 45 | +# Add redirect URI: {BASE_URL}/auth/github/callback |
| 46 | +GITHUB_CLIENT_ID= |
| 47 | +GITHUB_CLIENT_SECRET= |
| 48 | + |
| 49 | +# ============================================================================= |
| 50 | +# Telemetry & Analytics (optional) |
| 51 | +# ============================================================================= |
| 52 | + |
| 53 | +# Sentry - Error tracking and performance monitoring |
| 54 | +# Get DSN at: https://sentry.io/ |
| 55 | +SENTRY_DSN= |
| 56 | +SENTRY_TRACES_RATE=0.1 |
| 57 | +SENTRY_PROFILES_RATE=0.1 |
| 58 | +ENVIRONMENT=development |
| 59 | + |
| 60 | +# PostHog - Product analytics |
| 61 | +# Get API key at: https://posthog.com/ |
| 62 | +POSTHOG_API_KEY= |
| 63 | +POSTHOG_HOST=https://app.posthog.com |
| 64 | + |
| 65 | +# ============================================================================= |
| 66 | +# Session & Security |
| 67 | +# ============================================================================= |
| 68 | +# Secret key for session encryption (generate with: python -c "import secrets; print(secrets.token_hex(32))") |
| 69 | +SESSION_SECRET_KEY=change-me-in-production |
| 70 | + |
| 71 | +# ============================================================================= |
| 72 | +# Rate Limiting |
| 73 | +# ============================================================================= |
| 74 | +# Set to "false" to disable rate limiting |
| 75 | +RATE_LIMIT_ENABLED=true |
| 76 | +# Default requests per minute (applies to all endpoints not otherwise configured) |
| 77 | +RATE_LIMIT_PER_MINUTE=100 |
| 78 | +# API requests per minute |
| 79 | +RATE_LIMIT_API_PER_MINUTE=60 |
| 80 | +# Auth requests per minute (lower to prevent brute force) |
| 81 | +RATE_LIMIT_AUTH_PER_MINUTE=20 |
| 82 | + |
| 83 | +# ============================================================================= |
| 84 | +# Task Queue (Huey) |
| 85 | +# ============================================================================= |
| 86 | +# Set to "false" to disable task queue |
| 87 | +TASK_QUEUE_ENABLED=true |
| 88 | +# Path to Huey's SQLite database for task storage |
| 89 | +TASK_QUEUE_DB_PATH=./huey_tasks.db |
| 90 | +# Set to "true" for immediate task execution (testing only) |
| 91 | +TASK_QUEUE_IMMEDIATE=false |
| 92 | +# Days to retain old canvases before cleanup (default: 30) |
| 93 | +CANVAS_RETENTION_DAYS=30 |
0 commit comments