This repository has been archived on 2020-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
statuspage/app/settings/globals.py

25 lines
529 B
Python
Raw Normal View History

from pathlib import Path
from typing import Optional
2020-08-11 15:12:22 +02:00
from pydantic import AnyHttpUrl
from starlette.config import Config
p: Path = Path(__file__).parents[2] / "statuspagerc"
config: Config = Config(p if p.exists() else None)
2020-08-11 15:12:22 +02:00
SERVER_NAME: Optional[str]
SERVER_HOST: Optional[AnyHttpUrl]
DATABASE: str = config("DATABASE", cast=str)
ALEMBIC_CONFIG: str = (
DATABASE
)
JWT_SECRET: str = config("JWT_SECRET", cast=str)
JWT_ALGORITHM: str = config("JWT_ALGORITHM", cast=str)
JWT_EXPIRY: int = config("JWT_EXPIRY", cast=int)