feat: add backend FastAPI structure and Supabase schema
This commit is contained in:
35
server/app/core/config.py
Normal file
35
server/app/core/config.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from typing import Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = "BasuraApp API"
|
||||
debug: bool = True
|
||||
secret_key: str = "CAMBIA_ESTO_EN_PRODUCCION_clave_super_secreta"
|
||||
algorithm: str = "HS256"
|
||||
access_token_expire_minutes: int = 60 * 24 # 24 horas
|
||||
|
||||
# SQLite
|
||||
database_url: str = "sqlite:///./basura.db"
|
||||
|
||||
# Redis
|
||||
redis_host: str = "localhost"
|
||||
redis_port: int = 6379
|
||||
redis_db: int = 0
|
||||
redis_password: Optional[str] = None
|
||||
|
||||
# Cache settings
|
||||
cache_enabled: bool = True
|
||||
cache_ttl_eta: int = 30 # 30 segundos para ETA
|
||||
cache_ttl_addresses: int = 300 # 5 minutos para direcciones
|
||||
cache_ttl_guide: int = 86400 # 24 horas para guía de reciclaje
|
||||
|
||||
# Simulador
|
||||
sim_tick_seconds: int = 10
|
||||
sim_eta_alert_minutes: int = 10
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user