|
@@ -22,17 +22,17 @@ def get_config_path() -> Path:
|
|
|
base_path = Path(__file__).parent
|
|
base_path = Path(__file__).parent
|
|
|
|
|
|
|
|
if app_env == "prod":
|
|
if app_env == "prod":
|
|
|
- config_file = base_path / "config.prod.yaml"
|
|
|
|
|
|
|
+ config_file = base_path / "config/config.prod.yaml"
|
|
|
logger.info("使用生产环境配置: config.prod.yaml")
|
|
logger.info("使用生产环境配置: config.prod.yaml")
|
|
|
elif app_env == "test":
|
|
elif app_env == "test":
|
|
|
- config_file = base_path / "config.test.yaml"
|
|
|
|
|
|
|
+ config_file = base_path / "config/config.test.yaml"
|
|
|
logger.info("使用测试环境配置: config.test.yaml")
|
|
logger.info("使用测试环境配置: config.test.yaml")
|
|
|
elif app_env == "dev":
|
|
elif app_env == "dev":
|
|
|
- config_file = base_path / "config.dev.yaml"
|
|
|
|
|
|
|
+ config_file = base_path / "config/config.dev.yaml"
|
|
|
logger.info("使用开发环境配置: config.dev.yaml")
|
|
logger.info("使用开发环境配置: config.dev.yaml")
|
|
|
else:
|
|
else:
|
|
|
print("默认使用开发环境")
|
|
print("默认使用开发环境")
|
|
|
- config_file = base_path / "config.dev.yaml"
|
|
|
|
|
|
|
+ config_file = base_path / "config/config.dev.yaml"
|
|
|
if app_env:
|
|
if app_env:
|
|
|
logger.warning(f"未知的 APP_ENV 值: {app_env},使用默认 config.dev.yaml")
|
|
logger.warning(f"未知的 APP_ENV 值: {app_env},使用默认 config.dev.yaml")
|
|
|
|
|
|