Dockerized everything and added CI/CD deployment
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
# core/config.py
|
||||
from pydantic_settings import BaseSettings
|
||||
from os import getenv
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv() # Load .env file
|
||||
from pydantic import Field # Import Field for potential default values if needed
|
||||
import os
|
||||
|
||||
class Settings(BaseSettings):
|
||||
DB_URL: str = "postgresql://maia:maia@localhost:5432/maia"
|
||||
# Database settings - reads DB_URL from environment or .env
|
||||
DB_URL: str
|
||||
|
||||
REDIS_HOST: str = "localhost"
|
||||
REDIS_PORT: int = 6379
|
||||
# Redis settings - reads REDIS_URL from environment or .env, also used for Celery.
|
||||
REDIS_URL: str
|
||||
|
||||
# JWT settings - reads from environment or .env
|
||||
JWT_ALGORITHM: str = "HS256"
|
||||
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
||||
# ACCESS_TOKEN_EXPIRE_MINUTES: int = 1
|
||||
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
|
||||
|
||||
PEPPER: str = getenv("PEPPER", "")
|
||||
JWT_SECRET_KEY: str = getenv("JWT_SECRET_KEY", "")
|
||||
PEPPER: str
|
||||
JWT_SECRET_KEY: str
|
||||
|
||||
GOOGLE_API_KEY: str = getenv("GOOGLE_API_KEY", "")
|
||||
# Other settings
|
||||
GOOGLE_API_KEY: str = "" # Example with a default
|
||||
|
||||
class Config:
|
||||
# Tell pydantic-settings to load variables from a .env file
|
||||
env_file = '.env'
|
||||
env_file_encoding = 'utf-8'
|
||||
extra = 'ignore'
|
||||
|
||||
# Create a single instance of the settings
|
||||
settings = Settings()
|
||||
|
||||
Reference in New Issue
Block a user