mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
adds ServiceConfig and WebServerConfig
This commit is contained in:
parent
1dc3b62060
commit
e3eaf5ffe2
@ -1,3 +1,4 @@
|
|||||||
|
from pathlib import Path
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
|
|
||||||
from confz import BaseConfig, EnvSource
|
from confz import BaseConfig, EnvSource
|
||||||
@ -7,3 +8,15 @@ class OperationMode(BaseConfig): # type: ignore[misc]
|
|||||||
environment: Literal["development", "production"] = "development"
|
environment: Literal["development", "production"] = "development"
|
||||||
|
|
||||||
CONFIG_SOURCES = EnvSource(allow=["ENVIRONMENT"])
|
CONFIG_SOURCES = EnvSource(allow=["ENVIRONMENT"])
|
||||||
|
|
||||||
|
|
||||||
|
class ServiceConfig(BaseConfig): # type: ignore[misc]
|
||||||
|
service_config_dir: Path = Path("config")
|
||||||
|
|
||||||
|
CONFIG_SOURCES = EnvSource(allow=["SERVICE_CONFIG_DIR"])
|
||||||
|
|
||||||
|
|
||||||
|
class WebServerConfig(BaseConfig): # type: ignore[misc]
|
||||||
|
generate_new_web_settings: bool = False
|
||||||
|
|
||||||
|
CONFIG_SOURCES = EnvSource(allow=["GENERATE_NEW_WEB_SETTINGS"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user