2025-07-18 11:51:43 +02:00
|
|
|
"""Data service configuration"""
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-17 14:34:24 +02:00
|
|
|
from pydantic_settings import BaseSettings
|
2025-07-18 11:51:43 +02:00
|
|
|
from typing import List
|
2025-07-17 13:09:24 +02:00
|
|
|
|
|
|
|
|
class Settings(BaseSettings):
|
2025-07-18 11:51:43 +02:00
|
|
|
# Database
|
|
|
|
|
DATABASE_URL: str = "postgresql+asyncpg://data_user:data_pass123@data-db:5432/data_db"
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-18 11:51:43 +02:00
|
|
|
# Redis
|
|
|
|
|
REDIS_URL: str = "redis://redis:6379/3"
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-18 11:51:43 +02:00
|
|
|
# RabbitMQ
|
|
|
|
|
RABBITMQ_URL: str = "amqp://bakery:forecast123@rabbitmq:5672/"
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-18 11:51:43 +02:00
|
|
|
# External APIs
|
|
|
|
|
AEMET_API_KEY: str = "your-aemet-api-key-here"
|
|
|
|
|
MADRID_OPENDATA_API_KEY: str = "your-madrid-opendata-key-here"
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-18 11:51:43 +02:00
|
|
|
# Service settings
|
|
|
|
|
SERVICE_NAME: str = "data-service"
|
|
|
|
|
SERVICE_VERSION: str = "1.0.0"
|
2025-07-17 13:09:24 +02:00
|
|
|
|
2025-07-18 11:51:43 +02:00
|
|
|
# Auth
|
|
|
|
|
AUTH_SERVICE_URL: str = "http://auth-service:8000"
|
|
|
|
|
|
|
|
|
|
# CORS
|
|
|
|
|
CORS_ORIGINS: List[str] = ["http://localhost:3000", "http://localhost:3001"]
|
|
|
|
|
|
|
|
|
|
# Monitoring
|
|
|
|
|
LOG_LEVEL: str = "INFO"
|
|
|
|
|
ENABLE_METRICS: bool = True
|
2025-07-17 13:09:24 +02:00
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
|
env_file = ".env"
|
|
|
|
|
|
|
|
|
|
settings = Settings()
|