From 8906bf7996fb41fa2477b573df13179587b6a17d Mon Sep 17 00:00:00 2001 From: Mose Mueller Date: Thu, 11 Jan 2024 18:29:52 +0100 Subject: [PATCH] fixes config --- icon_service_base/database/config.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/icon_service_base/database/config.py b/icon_service_base/database/config.py index 0292805..a71b3d0 100644 --- a/icon_service_base/database/config.py +++ b/icon_service_base/database/config.py @@ -14,7 +14,7 @@ class OperationMode(BaseConfig): # type: ignore class ServiceConfig(BaseConfig): # type: ignore database_config_dir: Path = Path("database_config") - CONFIG_SOURCES = EnvSource(allow=["SERVICE_DATABASE_CONFIG_DIR"]) + CONFIG_SOURCES = EnvSource(prefix="SERVICE_", allow_all=True) class PostgreSQLConfig(BaseConfig): # type: ignore @@ -24,16 +24,8 @@ class PostgreSQLConfig(BaseConfig): # type: ignore user: str password: SecretStr - # if CONFIG_DIR: - # CONFIG_SOURCES = FileSource( - # CONFIG_DIR / f"postgres_{OperationMode().environment}.yaml" - # ) - class InfluxDBConfig(BaseConfig): # type: ignore url: AnyUrl org: str token: SecretStr - - # if CONFIG_DIR: - # CONFIG_SOURCES = FileSource(CONFIG_DIR / "influxdb_config.yaml")