Fixed environment variables without .env file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ba806ec67f
commit
4e06d454b2
@ -1,17 +1,16 @@
|
|||||||
from beanie import init_beanie
|
from beanie import init_beanie
|
||||||
from motor.motor_asyncio import AsyncIOMotorClient
|
from motor.motor_asyncio import AsyncIOMotorClient
|
||||||
from pydantic import BaseSettings
|
from pydantic import BaseSettings, Field
|
||||||
from typing import Literal
|
|
||||||
|
|
||||||
from models.request import Request
|
from models.request import Request
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
DATABASE_URL: str
|
DATABASE_URL: str = Field(..., env="DATABASE_URL")
|
||||||
AZURE_KEY: str
|
AZURE_KEY: str = Field(..., env="AZURE_KEY")
|
||||||
AZURE_ENDPOINT: str
|
AZURE_ENDPOINT: str = Field(..., env="AZURE_ENDPOINT")
|
||||||
AZURE_LOCATION: str
|
AZURE_LOCATION: str = Field(..., env="AZURE_LOCATION")
|
||||||
ENV: Literal["dev", "prod"]
|
ENV: str = Field(..., env="ENV")
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
env_file = ".env"
|
env_file = ".env"
|
||||||
|
Loading…
Reference in New Issue
Block a user