Fix issues
This commit is contained in:
@@ -1,30 +1,35 @@
|
||||
"""
|
||||
uLudata service configuration
|
||||
"""
|
||||
"""Data service configuration"""
|
||||
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import List
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings"""
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql+asyncpg://data_user:data_pass123@data-db:5432/data_db"
|
||||
|
||||
# Basic settings
|
||||
APP_NAME: str = "uLudata Service"
|
||||
VERSION: str = "1.0.0"
|
||||
DEBUG: bool = os.getenv("DEBUG", "False").lower() == "true"
|
||||
LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO")
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://redis:6379/3"
|
||||
|
||||
# Database settings
|
||||
DATABASE_URL: str = os.getenv("DATABASE_URL", "postgresql+asyncpg://data_user:data_pass123@data-db:5432/data_db")
|
||||
# RabbitMQ
|
||||
RABBITMQ_URL: str = "amqp://bakery:forecast123@rabbitmq:5672/"
|
||||
|
||||
# Redis settings
|
||||
REDIS_URL: str = os.getenv("REDIS_URL", "redis://redis:6379/0")
|
||||
# External APIs
|
||||
AEMET_API_KEY: str = "your-aemet-api-key-here"
|
||||
MADRID_OPENDATA_API_KEY: str = "your-madrid-opendata-key-here"
|
||||
|
||||
# RabbitMQ settings
|
||||
RABBITMQ_URL: str = os.getenv("RABBITMQ_URL", "amqp://bakery:forecast123@rabbitmq:5672/")
|
||||
# Service settings
|
||||
SERVICE_NAME: str = "data-service"
|
||||
SERVICE_VERSION: str = "1.0.0"
|
||||
|
||||
# Service URLs
|
||||
AUTH_SERVICE_URL: str = os.getenv("AUTH_SERVICE_URL", "http://auth-service:8000")
|
||||
# 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
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
Reference in New Issue
Block a user