Files
Hotel-Booking/Backend/.env.example
Iliyan Angelov f469cf7806 updates
2025-11-21 15:15:48 +02:00

95 lines
2.9 KiB
Plaintext

# ============================================
# Hotel Booking API - Environment Variables
# ============================================
# Copy this file to .env and fill in your actual values
# All variables are optional and have sensible defaults
# See src/config/settings.py for default values
# ============================================
# Application Configuration
# ============================================
ENVIRONMENT=development
# Options: development, staging, production
DEBUG=true
# Set to false in production
HOST=0.0.0.0
PORT=8000
API_V1_PREFIX=/api/v1
# ============================================
# Database Configuration
# ============================================
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASS=
# Leave empty if using MySQL without password
DB_NAME=hotel_db
# ============================================
# JWT Authentication
# ============================================
# JWT_SECRET will be auto-generated on startup if not set
# The generated secret will be saved here automatically
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
# ============================================
# CORS & Client Configuration
# ============================================
CLIENT_URL=http://localhost:5173
# Frontend application URL
CORS_ORIGINS=["http://localhost:5173","http://localhost:3000","http://127.0.0.1:5173"]
# JSON array of allowed origins (only used in production)
# ============================================
# Email & Payment Settings
# ============================================
# NOTE: Email (SMTP) and Payment Gateway (Stripe, PayPal) settings
# are configured in the Admin Dashboard, not via environment variables.
# Log in as admin and go to Settings page to configure these.
# ============================================
# Redis Configuration (Optional)
# ============================================
REDIS_ENABLED=false
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
# Leave empty if Redis has no password
# ============================================
# File Upload Configuration
# ============================================
UPLOAD_DIR=uploads
MAX_UPLOAD_SIZE=5242880
# Max upload size in bytes (5MB default)
ALLOWED_EXTENSIONS=["jpg","jpeg","png","gif","webp"]
# JSON array
# ============================================
# Rate Limiting
# ============================================
RATE_LIMIT_ENABLED=true
RATE_LIMIT_PER_MINUTE=60
# ============================================
# Logging Configuration
# ============================================
LOG_LEVEL=INFO
# Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_FILE=logs/app.log
LOG_MAX_BYTES=10485760
# Max log file size in bytes (10MB)
LOG_BACKUP_COUNT=5
# ============================================
# Server Configuration
# ============================================
REQUEST_TIMEOUT=30
# Request timeout in seconds (0 to disable)
HEALTH_CHECK_INTERVAL=30
# Health check interval in seconds