Change default location
Some checks failed
/ build (push) Failing after 12s

This commit is contained in:
phil 2024-11-01 06:00:37 +01:00
parent 7c33cb0b99
commit ae0d3532aa

View file

@ -65,9 +65,10 @@ def create_dirs():
def get_cache_dir() -> Path:
return Path(conf.storage.root_cache_path)
class MyBaseSettings(BaseSettings):
model_config = SettingsConfigDict(
env_prefix='treetrail_',
env_prefix="treetrail_",
env_nested_delimiter="_",
)
@ -113,8 +114,8 @@ class Tiles(MyBaseSettings):
class Map(MyBaseSettings):
zoom: float = 14.0
pitch: float = 0.0
lat: float = 12.0000
lng: float = 79.8106
lat: float = 45.8822
lng: float = 6.1781
bearing: float = 0
background: str = "OpenFreeMap"
@ -128,6 +129,7 @@ class Security(MyBaseSettings):
"""
JWT security configuration
"""
secret_key: str = token_hex(32)
'''Generate with eg.: "openssl rand -hex 32"'''
access_token_expire_minutes: float = 30
@ -156,14 +158,14 @@ class Config(MyBaseSettings):
storage: Storage = Storage()
map: Map = Map()
mapStyles: dict[str, str] = {
'OpenFreeMap': 'https://tiles.openfreemap.org/styles/liberty'
"OpenFreeMap": "https://tiles.openfreemap.org/styles/liberty"
}
tiles: Tiles = Tiles()
security: Security = Security()
geo: Geo = Geo()
version: str
db: DB = DB()
base_href: str = '/treetrail'
base_href: str = "/treetrail"
conf = Config(version=__version__) # type: ignore