Files
roa2web-service-auto/reports-app/telegram-bot/.env.example
Marius Mutu 830c5c8181 Refactor environment configuration templates with comprehensive documentation
Updates .env.example files for both backend and telegram-bot with:
- Complete variable coverage matching actual code usage
- Clear section-based organization (Oracle, JWT, SMTP, Cache, etc.)
- Detailed comments explaining purpose and usage location for each variable
- Added missing critical variables (AUTH_SESSION_SECRET, CACHE_*, token expiration settings)
- Removed unused/dead variables (CLAUDE_API_KEY, DEBUG, API_HOST, SQLITE_DB_PATH, etc.)
- Consistent formatting and structure across development and production templates

Critical additions:
- AUTH_SESSION_SECRET for email 2FA flow (must match between backend and telegram-bot)
- Full cache configuration variables (17 vars for hybrid L1/L2 cache system)
- Token expiration settings (ACCESS_TOKEN_EXPIRE_MINUTES, REFRESH_TOKEN_EXPIRE_DAYS)
- SMTP email retry settings for telegram bot

Ensures all .env.example files accurately reflect required and optional environment
variables used in the codebase, making deployment and configuration easier.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 12:30:44 +02:00

74 lines
2.7 KiB
Plaintext

# ============================================================================
# ROA2WEB Telegram Bot - Environment Configuration Template
# ============================================================================
# Copy this file to .env and fill in your actual values
# IMPORTANT: Never commit .env file to git!
# ============================================================================
# TELEGRAM BOT CONFIGURATION (REQUIRED)
# ============================================================================
# Obtain bot token from @BotFather on Telegram
# Used by app/main.py to authenticate the bot
TELEGRAM_BOT_TOKEN=your_bot_token_here
# ============================================================================
# BACKEND API CONFIGURATION (REQUIRED)
# ============================================================================
# Backend API URL for data retrieval
# Used by app/api/client.py and app/main.py
# Development: http://localhost:8001
# Docker: http://roa-backend:8000
BACKEND_URL=http://localhost:8001
# ============================================================================
# EMAIL AUTHENTICATION (SMTP) CONFIGURATION (REQUIRED for email 2FA)
# ============================================================================
# Required for email-based 2FA authentication flow
# Users can login with email + password instead of web app linking
# Used by app/utils/email_service.py
# SMTP Server Configuration
SMTP_HOST=mail.romfast.ro
SMTP_PORT=587
SMTP_USER=ups@romfast.ro
SMTP_PASSWORD=your_smtp_password_here
SMTP_FROM_EMAIL=ups@romfast.ro
SMTP_FROM_NAME=ROA2WEB
SMTP_USE_TLS=true
# Email Retry Settings (used by app/utils/email_service.py)
EMAIL_MAX_RETRIES=3
EMAIL_RETRY_DELAY=2.0
# ============================================================================
# SESSION SECURITY (REQUIRED)
# ============================================================================
# Must match backend AUTH_SESSION_SECRET for email login flow
# Used by app/auth/email_auth.py for session token validation
# Generate with: python3 -c "import secrets; print(secrets.token_urlsafe(32))"
AUTH_SESSION_SECRET=your-secure-random-secret-here-min-32-chars
# ============================================================================
# INTERNAL API CONFIGURATION (OPTIONAL - has defaults)
# ============================================================================
# Internal API port for backend to call telegram-bot (save auth codes)
# Used by app/main.py to start internal FastAPI server
# Default: 8002
INTERNAL_API_PORT=8002
# Enable internal API documentation (development only)
# Used by app/internal_api.py
# Default: false
ENABLE_DOCS=false
# Show detailed error messages in API responses (development only)
# Used by app/internal_api.py
# Default: false
DEBUG=false