2025-07-17 13:09:24 +02:00
|
|
|
"""
|
|
|
|
|
uLuforecasting service configuration
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import os
|
2025-07-17 14:34:24 +02:00
|
|
|
from pydantic_settings import BaseSettings
|
2025-07-17 13:09:24 +02:00
|
|
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
|
|
|
"""Application settings"""
|
|
|
|
|
|
|
|
|
|
# Basic settings
|
|
|
|
|
APP_NAME: str = "uLuforecasting Service"
|
|
|
|
|
VERSION: str = "1.0.0"
|
|
|
|
|
DEBUG: bool = os.getenv("DEBUG", "False").lower() == "true"
|
|
|
|
|
LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO")
|
|
|
|
|
|
|
|
|
|
# Database settings
|
|
|
|
|
DATABASE_URL: str = os.getenv("DATABASE_URL", "postgresql+asyncpg://forecasting_user:forecasting_pass123@forecasting-db:5432/forecasting_db")
|
|
|
|
|
|
|
|
|
|
# Redis settings
|
|
|
|
|
REDIS_URL: str = os.getenv("REDIS_URL", "redis://redis:6379/0")
|
|
|
|
|
|
|
|
|
|
# RabbitMQ settings
|
|
|
|
|
RABBITMQ_URL: str = os.getenv("RABBITMQ_URL", "amqp://bakery:forecast123@rabbitmq:5672/")
|
|
|
|
|
|
|
|
|
|
# Service URLs
|
|
|
|
|
AUTH_SERVICE_URL: str = os.getenv("AUTH_SERVICE_URL", "http://auth-service:8000")
|
|
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
|
env_file = ".env"
|
|
|
|
|
|
|
|
|
|
settings = Settings()
|