feat: setup project for docker deploy

This commit is contained in:
2025-07-23 22:00:35 +00:00
parent 98369ef531
commit 715bc90340
12 changed files with 139 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
from pydantic_settings import BaseSettings
from typing import Literal, List
import os
class Settings(BaseSettings):
database_url: str
@@ -9,12 +10,11 @@ class Settings(BaseSettings):
allow_origins: str
class Config:
env_file = ".env"
env_file = os.path.join(os.path.dirname(__file__), ".env")
env_file_encoding = "utf-8"
def get_allow_origins(self) -> List[str]:
return [origin.strip() for origin in self.allow_origins.split(",")]
# Singleton instance of settings
settings = Settings()
settings = Settings()