# Mantimon TCG Backend - Environment Configuration # Copy this file to .env and customize for your environment # # Usage: # cp .env.example .env # # Edit .env with your values # ============================================================================= # ENVIRONMENT # ============================================================================= # Options: dev, staging, prod ENVIRONMENT=dev # Enable debug mode (auto-enabled in dev) DEBUG=true # ============================================================================= # DATABASE (PostgreSQL) # ============================================================================= # Format: postgresql+asyncpg://user:password@host:port/database # Note: Port 5433 to avoid conflicts with other Postgres instances DATABASE_URL=postgresql+asyncpg://mantimon:mantimon@localhost:5433/mantimon # Connection pool settings DATABASE_POOL_SIZE=5 DATABASE_MAX_OVERFLOW=10 # Echo SQL statements (useful for debugging) DATABASE_ECHO=false # ============================================================================= # REDIS # ============================================================================= # Format: redis://host:port/db # Note: Port 6380 to avoid conflicts with other Redis instances REDIS_URL=redis://localhost:6380/0 # Max connections in pool REDIS_MAX_CONNECTIONS=10 # ============================================================================= # SECURITY # ============================================================================= # IMPORTANT: Change this in production! # Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))" SECRET_KEY=dev-secret-key-change-in-production # JWT settings JWT_ALGORITHM=HS256 JWT_EXPIRE_MINUTES=30 JWT_REFRESH_EXPIRE_DAYS=7 # ============================================================================= # OAUTH - GOOGLE # ============================================================================= # Get credentials from: https://console.cloud.google.com/apis/credentials # GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com # GOOGLE_CLIENT_SECRET=your-client-secret # ============================================================================= # OAUTH - DISCORD # ============================================================================= # Get credentials from: https://discord.com/developers/applications # DISCORD_CLIENT_ID=your-client-id # DISCORD_CLIENT_SECRET=your-client-secret # ============================================================================= # CORS # ============================================================================= # Comma-separated list of allowed origins # CORS_ORIGINS=http://localhost:3000,http://localhost:5173 # ============================================================================= # GAME SETTINGS # ============================================================================= # Turn timeout in seconds (default: 120 = 2 minutes) TURN_TIMEOUT_SECONDS=120 # ============================================================================= # CARD DATA # ============================================================================= # Path to card JSON files (relative to backend/) CARD_DATA_PATH=data/cards