# Environment Variables Template # Copy this file to .env and fill in the values # NEVER commit .env to git! # ============================================================================= # CORE CONFIGURATION # ============================================================================= # Application APP_NAME="BlackRoad Service" APP_VERSION="1.0.0" ENVIRONMENT=development # development, staging, production DEBUG=True # Set to False in production # Server PORT=8000 HOST=0.0.0.0 # Security SECRET_KEY= # Generate with: openssl rand -hex 32 ALLOWED_ORIGINS=http://localhost:8000,http://localhost:3000 # ============================================================================= # DATABASE # ============================================================================= # PostgreSQL (Railway managed) DATABASE_URL= # Format: postgresql+asyncpg://user:pass@host:5432/db # Database pool settings DB_POOL_SIZE=10 DB_MAX_OVERFLOW=20 # ============================================================================= # CACHE # ============================================================================= # Redis (Railway managed) REDIS_URL= # Format: redis://host:6379/0 # Redis settings REDIS_MAX_CONNECTIONS=10 # ============================================================================= # AUTHENTICATION # ============================================================================= # JWT settings ACCESS_TOKEN_EXPIRE_MINUTES=30 REFRESH_TOKEN_EXPIRE_DAYS=7 # Password hashing BCRYPT_ROUNDS=12 # ============================================================================= # BLOCKCHAIN (If applicable) # ============================================================================= WALLET_MASTER_KEY= # Generate with: openssl rand -hex 32 # ============================================================================= # EXTERNAL APIs (Optional) # ============================================================================= # OpenAI OPENAI_API_KEY= # GitHub GITHUB_TOKEN= GITHUB_WEBHOOK_SECRET= # Generate with: openssl rand -hex 32 # Stripe (Payments) STRIPE_SECRET_KEY= STRIPE_PUBLISHABLE_KEY= STRIPE_WEBHOOK_SECRET= # Sentry (Error Tracking) SENTRY_DSN= # Twilio (SMS) TWILIO_ACCOUNT_SID= TWILIO_AUTH_TOKEN= TWILIO_PHONE_NUMBER= # ============================================================================= # MONITORING & OBSERVABILITY # ============================================================================= # Logging LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR, CRITICAL # Metrics ENABLE_METRICS=true METRICS_PORT=9090 # ============================================================================= # FEATURE FLAGS # ============================================================================= ENABLE_WEBSOCKETS=false ENABLE_GRAPHQL=false ENABLE_RATE_LIMITING=true # ============================================================================= # CORS # ============================================================================= CORS_ALLOW_CREDENTIALS=true CORS_MAX_AGE=3600 # ============================================================================= # NOTES # ============================================================================= # 1. Generate secure random keys: # openssl rand -hex 32 # # 2. Never commit .env to git! # Add .env to .gitignore # # 3. For Railway deployment: # Set these in Railway dashboard # Use ${{Postgres.DATABASE_URL}} and ${{Redis.REDIS_URL}} references # # 4. For local development: # Use docker-compose for Postgres and Redis # Or connect to Railway services