2024-07-07 12:18:15 +08:00
|
|
|
from pydantic import Field
|
|
|
|
from pydantic_settings import BaseSettings
|
2024-06-19 13:41:12 +08:00
|
|
|
|
|
|
|
|
2024-07-07 12:18:15 +08:00
|
|
|
class DeploymentConfig(BaseSettings):
|
2024-06-19 13:41:12 +08:00
|
|
|
"""
|
2024-09-22 12:38:41 +07:00
|
|
|
Configuration settings for application deployment
|
2024-06-19 13:41:12 +08:00
|
|
|
"""
|
2024-08-23 23:46:01 +08:00
|
|
|
|
2024-06-25 15:48:02 +08:00
|
|
|
APPLICATION_NAME: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Name of the application, used for identification and logging purposes",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="langgenius/dify",
|
2024-06-25 15:48:02 +08:00
|
|
|
)
|
|
|
|
|
2024-08-23 22:40:07 +08:00
|
|
|
DEBUG: bool = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Enable debug mode for additional logging and development features",
|
2024-08-23 22:40:07 +08:00
|
|
|
default=False,
|
|
|
|
)
|
|
|
|
|
2025-05-17 17:31:09 +08:00
|
|
|
# Request logging configuration
|
|
|
|
ENABLE_REQUEST_LOGGING: bool = Field(
|
|
|
|
description="Enable request and response body logging",
|
|
|
|
default=False,
|
|
|
|
)
|
|
|
|
|
2024-06-19 13:41:12 +08:00
|
|
|
EDITION: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Deployment edition of the application (e.g., 'SELF_HOSTED', 'CLOUD')",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="SELF_HOSTED",
|
2024-06-19 13:41:12 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
DEPLOY_ENV: str = Field(
|
2024-09-22 12:38:41 +07:00
|
|
|
description="Deployment environment (e.g., 'PRODUCTION', 'DEVELOPMENT'), default to PRODUCTION",
|
2024-08-23 23:46:01 +08:00
|
|
|
default="PRODUCTION",
|
2024-06-19 13:41:12 +08:00
|
|
|
)
|