feat: setup project for docker deploy
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user