This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
# Load .env file manually from project root
|
||||
from dotenv import load_dotenv
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
# Find and load .env file
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -19,35 +19,37 @@ else:
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Database
|
||||
DATABASE_URL: str = "postgresql+asyncpg://admin:password@localhost:5432/women_safety"
|
||||
|
||||
DATABASE_URL: str = (
|
||||
"postgresql+asyncpg://admin:password@localhost:5432/women_safety"
|
||||
)
|
||||
|
||||
# Redis
|
||||
REDIS_URL: str = "redis://localhost:6379/0"
|
||||
|
||||
|
||||
# Kafka
|
||||
KAFKA_BOOTSTRAP_SERVERS: str = "localhost:9092"
|
||||
|
||||
|
||||
# JWT
|
||||
SECRET_KEY: str = "your-secret-key-change-in-production"
|
||||
ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
|
||||
|
||||
# App
|
||||
APP_NAME: str = "Women Safety App"
|
||||
DEBUG: bool = True
|
||||
API_V1_STR: str = "/api/v1"
|
||||
|
||||
|
||||
# External Services
|
||||
FCM_SERVER_KEY: Optional[str] = None
|
||||
|
||||
|
||||
# Security
|
||||
CORS_ORIGINS: list = ["*"] # Change in production
|
||||
|
||||
|
||||
# Location
|
||||
MAX_EMERGENCY_RADIUS_KM: float = 1.0
|
||||
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
settings = Settings()
|
||||
settings = Settings()
|
||||
|
||||
Reference in New Issue
Block a user