31 lines
800 B
Python
31 lines
800 B
Python
"""Application configuration via pydantic-settings."""
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
# Database
|
|
DATABASE_URL: str = "postgresql+asyncpg://lakehouse:lakehouse123@postgres-meta/lakehouse_meta"
|
|
|
|
# Redis
|
|
REDIS_URL: str = "redis://redis:6379/0"
|
|
|
|
# JWT
|
|
JWT_SECRET: str = "CHANGE_ME_IN_PRODUCTION"
|
|
JWT_ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
|
|
|
# MQTT
|
|
MQTT_BROKER: str = "smart-city-digital-twin-martinique-mosquitto-1"
|
|
MQTT_PORT: int = 1883
|
|
|
|
# CORS
|
|
CORS_ORIGINS: List[str] = ["*"]
|
|
|
|
|
|
settings = Settings()
|