-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
21 changed files
with
765 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
from configs.deploy import DeploymentConfigs | ||
from configs.enterprise import EnterpriseFeatureConfigs | ||
from configs.extra import ExtraServiceConfigs | ||
from configs.feature import FeatureConfigs | ||
from configs.middleware import MiddlewareConfigs | ||
from configs.packaging import PackagingInfo | ||
|
||
|
||
class DifyConfigs( | ||
# based on pydantic-settings | ||
BaseSettings, | ||
|
||
# Packaging info | ||
PackagingInfo, | ||
|
||
# Deployment configs | ||
DeploymentConfigs, | ||
|
||
# Feature configs | ||
FeatureConfigs, | ||
|
||
# Middleware configs | ||
MiddlewareConfigs, | ||
|
||
# Extra service configs | ||
ExtraServiceConfigs, | ||
|
||
# Enterprise feature configs | ||
# **Before using, please contact business@dify.ai by email to inquire about licensing matters.** | ||
EnterpriseFeatureConfigs, | ||
): | ||
|
||
model_config = SettingsConfigDict( | ||
# read from dotenv format config file | ||
env_file='.env', | ||
env_file_encoding='utf-8', | ||
|
||
# ignore extra attributes | ||
extra='ignore', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class DeploymentConfigs(BaseModel): | ||
""" | ||
Deployment configs | ||
""" | ||
EDITION: str = Field( | ||
description='deployment edition', | ||
default='SELF_HOSTED', | ||
) | ||
|
||
DEPLOY_ENV: str = Field( | ||
description='deployment environment, default to PRODUCTION.', | ||
default='PRODUCTION', | ||
) |
Oops, something went wrong.