You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.env.example 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. # Your App secret key will be used for securely signing the session cookie
  2. # Make sure you are changing this key for your deployment with a strong key.
  3. # You can generate a strong key using `openssl rand -base64 42`.
  4. # Alternatively you can set it with `SECRET_KEY` environment variable.
  5. SECRET_KEY=
  6. # Ensure UTF-8 encoding
  7. LANG=en_US.UTF-8
  8. LC_ALL=en_US.UTF-8
  9. PYTHONIOENCODING=utf-8
  10. # Console API base URL
  11. CONSOLE_API_URL=http://localhost:5001
  12. CONSOLE_WEB_URL=http://localhost:3000
  13. # Service API base URL
  14. SERVICE_API_URL=http://localhost:5001
  15. # Web APP base URL
  16. APP_WEB_URL=http://localhost:3000
  17. # Files URL
  18. FILES_URL=http://localhost:5001
  19. # INTERNAL_FILES_URL is used for plugin daemon communication within Docker network.
  20. # Set this to the internal Docker service URL for proper plugin file access.
  21. # Example: INTERNAL_FILES_URL=http://api:5001
  22. INTERNAL_FILES_URL=http://127.0.0.1:5001
  23. # The time in seconds after the signature is rejected
  24. FILES_ACCESS_TIMEOUT=300
  25. # Access token expiration time in minutes
  26. ACCESS_TOKEN_EXPIRE_MINUTES=60
  27. # Refresh token expiration time in days
  28. REFRESH_TOKEN_EXPIRE_DAYS=30
  29. # redis configuration
  30. REDIS_HOST=localhost
  31. REDIS_PORT=6379
  32. REDIS_USERNAME=
  33. REDIS_PASSWORD=difyai123456
  34. REDIS_USE_SSL=false
  35. REDIS_DB=0
  36. # redis Sentinel configuration.
  37. REDIS_USE_SENTINEL=false
  38. REDIS_SENTINELS=
  39. REDIS_SENTINEL_SERVICE_NAME=
  40. REDIS_SENTINEL_USERNAME=
  41. REDIS_SENTINEL_PASSWORD=
  42. REDIS_SENTINEL_SOCKET_TIMEOUT=0.1
  43. # redis Cluster configuration.
  44. REDIS_USE_CLUSTERS=false
  45. REDIS_CLUSTERS=
  46. REDIS_CLUSTERS_PASSWORD=
  47. # celery configuration
  48. CELERY_BROKER_URL=redis://:difyai123456@localhost:${REDIS_PORT}/1
  49. CELERY_BACKEND=redis
  50. # PostgreSQL database configuration
  51. DB_USERNAME=postgres
  52. DB_PASSWORD=difyai123456
  53. DB_HOST=localhost
  54. DB_PORT=5432
  55. DB_DATABASE=dify
  56. # Storage configuration
  57. # use for store upload files, private keys...
  58. # storage type: opendal, s3, aliyun-oss, azure-blob, baidu-obs, google-storage, huawei-obs, oci-storage, tencent-cos, volcengine-tos, supabase
  59. STORAGE_TYPE=opendal
  60. # Apache OpenDAL storage configuration, refer to https://github.com/apache/opendal
  61. OPENDAL_SCHEME=fs
  62. OPENDAL_FS_ROOT=storage
  63. # S3 Storage configuration
  64. S3_USE_AWS_MANAGED_IAM=false
  65. S3_ENDPOINT=https://your-bucket-name.storage.s3.cloudflare.com
  66. S3_BUCKET_NAME=your-bucket-name
  67. S3_ACCESS_KEY=your-access-key
  68. S3_SECRET_KEY=your-secret-key
  69. S3_REGION=your-region
  70. # Azure Blob Storage configuration
  71. AZURE_BLOB_ACCOUNT_NAME=your-account-name
  72. AZURE_BLOB_ACCOUNT_KEY=your-account-key
  73. AZURE_BLOB_CONTAINER_NAME=your-container-name
  74. AZURE_BLOB_ACCOUNT_URL=https://<your_account_name>.blob.core.windows.net
  75. # Aliyun oss Storage configuration
  76. ALIYUN_OSS_BUCKET_NAME=your-bucket-name
  77. ALIYUN_OSS_ACCESS_KEY=your-access-key
  78. ALIYUN_OSS_SECRET_KEY=your-secret-key
  79. ALIYUN_OSS_ENDPOINT=your-endpoint
  80. ALIYUN_OSS_AUTH_VERSION=v1
  81. ALIYUN_OSS_REGION=your-region
  82. # Don't start with '/'. OSS doesn't support leading slash in object names.
  83. ALIYUN_OSS_PATH=your-path
  84. # Google Storage configuration
  85. GOOGLE_STORAGE_BUCKET_NAME=your-bucket-name
  86. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64=your-google-service-account-json-base64-string
  87. # Tencent COS Storage configuration
  88. TENCENT_COS_BUCKET_NAME=your-bucket-name
  89. TENCENT_COS_SECRET_KEY=your-secret-key
  90. TENCENT_COS_SECRET_ID=your-secret-id
  91. TENCENT_COS_REGION=your-region
  92. TENCENT_COS_SCHEME=your-scheme
  93. # Huawei OBS Storage Configuration
  94. HUAWEI_OBS_BUCKET_NAME=your-bucket-name
  95. HUAWEI_OBS_SECRET_KEY=your-secret-key
  96. HUAWEI_OBS_ACCESS_KEY=your-access-key
  97. HUAWEI_OBS_SERVER=your-server-url
  98. # Baidu OBS Storage Configuration
  99. BAIDU_OBS_BUCKET_NAME=your-bucket-name
  100. BAIDU_OBS_SECRET_KEY=your-secret-key
  101. BAIDU_OBS_ACCESS_KEY=your-access-key
  102. BAIDU_OBS_ENDPOINT=your-server-url
  103. # OCI Storage configuration
  104. OCI_ENDPOINT=your-endpoint
  105. OCI_BUCKET_NAME=your-bucket-name
  106. OCI_ACCESS_KEY=your-access-key
  107. OCI_SECRET_KEY=your-secret-key
  108. OCI_REGION=your-region
  109. # Volcengine tos Storage configuration
  110. VOLCENGINE_TOS_ENDPOINT=your-endpoint
  111. VOLCENGINE_TOS_BUCKET_NAME=your-bucket-name
  112. VOLCENGINE_TOS_ACCESS_KEY=your-access-key
  113. VOLCENGINE_TOS_SECRET_KEY=your-secret-key
  114. VOLCENGINE_TOS_REGION=your-region
  115. # Supabase Storage Configuration
  116. SUPABASE_BUCKET_NAME=your-bucket-name
  117. SUPABASE_API_KEY=your-access-key
  118. SUPABASE_URL=your-server-url
  119. # CORS configuration
  120. WEB_API_CORS_ALLOW_ORIGINS=http://localhost:3000,*
  121. CONSOLE_CORS_ALLOW_ORIGINS=http://localhost:3000,*
  122. # Vector database configuration
  123. # Supported values are `weaviate`, `qdrant`, `milvus`, `myscale`, `relyt`, `pgvector`, `pgvecto-rs`, `chroma`, `opensearch`, `oracle`, `tencent`, `elasticsearch`, `elasticsearch-ja`, `analyticdb`, `couchbase`, `vikingdb`, `oceanbase`, `opengauss`, `tablestore`,`vastbase`,`tidb`,`tidb_on_qdrant`,`baidu`,`lindorm`,`huawei_cloud`,`upstash`, `matrixone`.
  124. VECTOR_STORE=weaviate
  125. # Prefix used to create collection name in vector database
  126. VECTOR_INDEX_NAME_PREFIX=Vector_index
  127. # Weaviate configuration
  128. WEAVIATE_ENDPOINT=http://localhost:8080
  129. WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
  130. WEAVIATE_GRPC_ENABLED=false
  131. WEAVIATE_BATCH_SIZE=100
  132. # Qdrant configuration, use `http://localhost:6333` for local mode or `https://your-qdrant-cluster-url.qdrant.io` for remote mode
  133. QDRANT_URL=http://localhost:6333
  134. QDRANT_API_KEY=difyai123456
  135. QDRANT_CLIENT_TIMEOUT=20
  136. QDRANT_GRPC_ENABLED=false
  137. QDRANT_GRPC_PORT=6334
  138. QDRANT_REPLICATION_FACTOR=1
  139. #Couchbase configuration
  140. COUCHBASE_CONNECTION_STRING=127.0.0.1
  141. COUCHBASE_USER=Administrator
  142. COUCHBASE_PASSWORD=password
  143. COUCHBASE_BUCKET_NAME=Embeddings
  144. COUCHBASE_SCOPE_NAME=_default
  145. # Milvus configuration
  146. MILVUS_URI=http://127.0.0.1:19530
  147. MILVUS_TOKEN=
  148. MILVUS_USER=root
  149. MILVUS_PASSWORD=Milvus
  150. MILVUS_ANALYZER_PARAMS=
  151. # MyScale configuration
  152. MYSCALE_HOST=127.0.0.1
  153. MYSCALE_PORT=8123
  154. MYSCALE_USER=default
  155. MYSCALE_PASSWORD=
  156. MYSCALE_DATABASE=default
  157. MYSCALE_FTS_PARAMS=
  158. # Relyt configuration
  159. RELYT_HOST=127.0.0.1
  160. RELYT_PORT=5432
  161. RELYT_USER=postgres
  162. RELYT_PASSWORD=postgres
  163. RELYT_DATABASE=postgres
  164. # Tencent configuration
  165. TENCENT_VECTOR_DB_URL=http://127.0.0.1
  166. TENCENT_VECTOR_DB_API_KEY=dify
  167. TENCENT_VECTOR_DB_TIMEOUT=30
  168. TENCENT_VECTOR_DB_USERNAME=dify
  169. TENCENT_VECTOR_DB_DATABASE=dify
  170. TENCENT_VECTOR_DB_SHARD=1
  171. TENCENT_VECTOR_DB_REPLICAS=2
  172. TENCENT_VECTOR_DB_ENABLE_HYBRID_SEARCH=false
  173. # ElasticSearch configuration
  174. ELASTICSEARCH_HOST=127.0.0.1
  175. ELASTICSEARCH_PORT=9200
  176. ELASTICSEARCH_USERNAME=elastic
  177. ELASTICSEARCH_PASSWORD=elastic
  178. # PGVECTO_RS configuration
  179. PGVECTO_RS_HOST=localhost
  180. PGVECTO_RS_PORT=5431
  181. PGVECTO_RS_USER=postgres
  182. PGVECTO_RS_PASSWORD=difyai123456
  183. PGVECTO_RS_DATABASE=postgres
  184. # PGVector configuration
  185. PGVECTOR_HOST=127.0.0.1
  186. PGVECTOR_PORT=5433
  187. PGVECTOR_USER=postgres
  188. PGVECTOR_PASSWORD=postgres
  189. PGVECTOR_DATABASE=postgres
  190. PGVECTOR_MIN_CONNECTION=1
  191. PGVECTOR_MAX_CONNECTION=5
  192. # TableStore Vector configuration
  193. TABLESTORE_ENDPOINT=https://instance-name.cn-hangzhou.ots.aliyuncs.com
  194. TABLESTORE_INSTANCE_NAME=instance-name
  195. TABLESTORE_ACCESS_KEY_ID=xxx
  196. TABLESTORE_ACCESS_KEY_SECRET=xxx
  197. TABLESTORE_NORMALIZE_FULLTEXT_BM25_SCORE=false
  198. # Tidb Vector configuration
  199. TIDB_VECTOR_HOST=xxx.eu-central-1.xxx.aws.tidbcloud.com
  200. TIDB_VECTOR_PORT=4000
  201. TIDB_VECTOR_USER=xxx.root
  202. TIDB_VECTOR_PASSWORD=xxxxxx
  203. TIDB_VECTOR_DATABASE=dify
  204. # Tidb on qdrant configuration
  205. TIDB_ON_QDRANT_URL=http://127.0.0.1
  206. TIDB_ON_QDRANT_API_KEY=dify
  207. TIDB_ON_QDRANT_CLIENT_TIMEOUT=20
  208. TIDB_ON_QDRANT_GRPC_ENABLED=false
  209. TIDB_ON_QDRANT_GRPC_PORT=6334
  210. TIDB_PUBLIC_KEY=dify
  211. TIDB_PRIVATE_KEY=dify
  212. TIDB_API_URL=http://127.0.0.1
  213. TIDB_IAM_API_URL=http://127.0.0.1
  214. TIDB_REGION=regions/aws-us-east-1
  215. TIDB_PROJECT_ID=dify
  216. TIDB_SPEND_LIMIT=100
  217. # Chroma configuration
  218. CHROMA_HOST=127.0.0.1
  219. CHROMA_PORT=8000
  220. CHROMA_TENANT=default_tenant
  221. CHROMA_DATABASE=default_database
  222. CHROMA_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthenticationServerProvider
  223. CHROMA_AUTH_CREDENTIALS=difyai123456
  224. # AnalyticDB configuration
  225. ANALYTICDB_KEY_ID=your-ak
  226. ANALYTICDB_KEY_SECRET=your-sk
  227. ANALYTICDB_REGION_ID=cn-hangzhou
  228. ANALYTICDB_INSTANCE_ID=gp-ab123456
  229. ANALYTICDB_ACCOUNT=testaccount
  230. ANALYTICDB_PASSWORD=testpassword
  231. ANALYTICDB_NAMESPACE=dify
  232. ANALYTICDB_NAMESPACE_PASSWORD=difypassword
  233. ANALYTICDB_HOST=gp-test.aliyuncs.com
  234. ANALYTICDB_PORT=5432
  235. ANALYTICDB_MIN_CONNECTION=1
  236. ANALYTICDB_MAX_CONNECTION=5
  237. # OpenSearch configuration
  238. OPENSEARCH_HOST=127.0.0.1
  239. OPENSEARCH_PORT=9200
  240. OPENSEARCH_USER=admin
  241. OPENSEARCH_PASSWORD=admin
  242. OPENSEARCH_SECURE=true
  243. OPENSEARCH_VERIFY_CERTS=true
  244. # Baidu configuration
  245. BAIDU_VECTOR_DB_ENDPOINT=http://127.0.0.1:5287
  246. BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS=30000
  247. BAIDU_VECTOR_DB_ACCOUNT=root
  248. BAIDU_VECTOR_DB_API_KEY=dify
  249. BAIDU_VECTOR_DB_DATABASE=dify
  250. BAIDU_VECTOR_DB_SHARD=1
  251. BAIDU_VECTOR_DB_REPLICAS=3
  252. # Upstash configuration
  253. UPSTASH_VECTOR_URL=your-server-url
  254. UPSTASH_VECTOR_TOKEN=your-access-token
  255. # ViKingDB configuration
  256. VIKINGDB_ACCESS_KEY=your-ak
  257. VIKINGDB_SECRET_KEY=your-sk
  258. VIKINGDB_REGION=cn-shanghai
  259. VIKINGDB_HOST=api-vikingdb.xxx.volces.com
  260. VIKINGDB_SCHEMA=http
  261. VIKINGDB_CONNECTION_TIMEOUT=30
  262. VIKINGDB_SOCKET_TIMEOUT=30
  263. # Matrixone configration
  264. MATRIXONE_HOST=127.0.0.1
  265. MATRIXONE_PORT=6001
  266. MATRIXONE_USER=dump
  267. MATRIXONE_PASSWORD=111
  268. MATRIXONE_DATABASE=dify
  269. # Lindorm configuration
  270. LINDORM_URL=http://ld-*******************-proxy-search-pub.lindorm.aliyuncs.com:30070
  271. LINDORM_USERNAME=admin
  272. LINDORM_PASSWORD=admin
  273. USING_UGC_INDEX=False
  274. LINDORM_QUERY_TIMEOUT=1
  275. # OceanBase Vector configuration
  276. OCEANBASE_VECTOR_HOST=127.0.0.1
  277. OCEANBASE_VECTOR_PORT=2881
  278. OCEANBASE_VECTOR_USER=root@test
  279. OCEANBASE_VECTOR_PASSWORD=difyai123456
  280. OCEANBASE_VECTOR_DATABASE=test
  281. OCEANBASE_MEMORY_LIMIT=6G
  282. OCEANBASE_ENABLE_HYBRID_SEARCH=false
  283. # openGauss configuration
  284. OPENGAUSS_HOST=127.0.0.1
  285. OPENGAUSS_PORT=6600
  286. OPENGAUSS_USER=postgres
  287. OPENGAUSS_PASSWORD=Dify@123
  288. OPENGAUSS_DATABASE=dify
  289. OPENGAUSS_MIN_CONNECTION=1
  290. OPENGAUSS_MAX_CONNECTION=5
  291. # Upload configuration
  292. UPLOAD_FILE_SIZE_LIMIT=15
  293. UPLOAD_FILE_BATCH_LIMIT=5
  294. UPLOAD_IMAGE_FILE_SIZE_LIMIT=10
  295. UPLOAD_VIDEO_FILE_SIZE_LIMIT=100
  296. UPLOAD_AUDIO_FILE_SIZE_LIMIT=50
  297. # Model configuration
  298. MULTIMODAL_SEND_FORMAT=base64
  299. PROMPT_GENERATION_MAX_TOKENS=512
  300. CODE_GENERATION_MAX_TOKENS=1024
  301. PLUGIN_BASED_TOKEN_COUNTING_ENABLED=false
  302. # Mail configuration, support: resend, smtp, sendgrid
  303. MAIL_TYPE=
  304. # If using SendGrid, use the 'from' field for authentication if necessary.
  305. MAIL_DEFAULT_SEND_FROM=no-reply <no-reply@dify.ai>
  306. # resend configuration
  307. RESEND_API_KEY=
  308. RESEND_API_URL=https://api.resend.com
  309. # smtp configuration
  310. SMTP_SERVER=smtp.gmail.com
  311. SMTP_PORT=465
  312. SMTP_USERNAME=123
  313. SMTP_PASSWORD=abc
  314. SMTP_USE_TLS=true
  315. SMTP_OPPORTUNISTIC_TLS=false
  316. # Sendgid configuration
  317. SENDGRID_API_KEY=
  318. # Sentry configuration
  319. SENTRY_DSN=
  320. # DEBUG
  321. DEBUG=false
  322. ENABLE_REQUEST_LOGGING=False
  323. SQLALCHEMY_ECHO=false
  324. # Notion import configuration, support public and internal
  325. NOTION_INTEGRATION_TYPE=public
  326. NOTION_CLIENT_SECRET=you-client-secret
  327. NOTION_CLIENT_ID=you-client-id
  328. NOTION_INTERNAL_SECRET=you-internal-secret
  329. ETL_TYPE=dify
  330. UNSTRUCTURED_API_URL=
  331. UNSTRUCTURED_API_KEY=
  332. SCARF_NO_ANALYTICS=true
  333. #ssrf
  334. SSRF_PROXY_HTTP_URL=
  335. SSRF_PROXY_HTTPS_URL=
  336. SSRF_DEFAULT_MAX_RETRIES=3
  337. SSRF_DEFAULT_TIME_OUT=5
  338. SSRF_DEFAULT_CONNECT_TIME_OUT=5
  339. SSRF_DEFAULT_READ_TIME_OUT=5
  340. SSRF_DEFAULT_WRITE_TIME_OUT=5
  341. BATCH_UPLOAD_LIMIT=10
  342. KEYWORD_DATA_SOURCE_TYPE=database
  343. # Workflow file upload limit
  344. WORKFLOW_FILE_UPLOAD_LIMIT=10
  345. # CODE EXECUTION CONFIGURATION
  346. CODE_EXECUTION_ENDPOINT=http://127.0.0.1:8194
  347. CODE_EXECUTION_API_KEY=dify-sandbox
  348. CODE_MAX_NUMBER=9223372036854775807
  349. CODE_MIN_NUMBER=-9223372036854775808
  350. CODE_MAX_STRING_LENGTH=80000
  351. TEMPLATE_TRANSFORM_MAX_LENGTH=80000
  352. CODE_MAX_STRING_ARRAY_LENGTH=30
  353. CODE_MAX_OBJECT_ARRAY_LENGTH=30
  354. CODE_MAX_NUMBER_ARRAY_LENGTH=1000
  355. # API Tool configuration
  356. API_TOOL_DEFAULT_CONNECT_TIMEOUT=10
  357. API_TOOL_DEFAULT_READ_TIMEOUT=60
  358. # HTTP Node configuration
  359. HTTP_REQUEST_MAX_CONNECT_TIMEOUT=300
  360. HTTP_REQUEST_MAX_READ_TIMEOUT=600
  361. HTTP_REQUEST_MAX_WRITE_TIMEOUT=600
  362. HTTP_REQUEST_NODE_MAX_BINARY_SIZE=10485760
  363. HTTP_REQUEST_NODE_MAX_TEXT_SIZE=1048576
  364. HTTP_REQUEST_NODE_SSL_VERIFY=True
  365. # Respect X-* headers to redirect clients
  366. RESPECT_XFORWARD_HEADERS_ENABLED=false
  367. # Log file path
  368. LOG_FILE=
  369. # Log file max size, the unit is MB
  370. LOG_FILE_MAX_SIZE=20
  371. # Log file max backup count
  372. LOG_FILE_BACKUP_COUNT=5
  373. # Log dateformat
  374. LOG_DATEFORMAT=%Y-%m-%d %H:%M:%S
  375. # Log Timezone
  376. LOG_TZ=UTC
  377. # Log format
  378. LOG_FORMAT=%(asctime)s,%(msecs)d %(levelname)-2s [%(filename)s:%(lineno)d] %(req_id)s %(message)s
  379. # Indexing configuration
  380. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
  381. # Workflow runtime configuration
  382. WORKFLOW_MAX_EXECUTION_STEPS=500
  383. WORKFLOW_MAX_EXECUTION_TIME=1200
  384. WORKFLOW_CALL_MAX_DEPTH=5
  385. WORKFLOW_PARALLEL_DEPTH_LIMIT=3
  386. MAX_VARIABLE_SIZE=204800
  387. # Workflow storage configuration
  388. # Options: rdbms, hybrid
  389. # rdbms: Use only the relational database (default)
  390. # hybrid: Save new data to object storage, read from both object storage and RDBMS
  391. WORKFLOW_NODE_EXECUTION_STORAGE=rdbms
  392. # Repository configuration
  393. # Core workflow execution repository implementation
  394. CORE_WORKFLOW_EXECUTION_REPOSITORY=core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository
  395. # Core workflow node execution repository implementation
  396. CORE_WORKFLOW_NODE_EXECUTION_REPOSITORY=core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository
  397. # API workflow node execution repository implementation
  398. API_WORKFLOW_NODE_EXECUTION_REPOSITORY=repositories.sqlalchemy_api_workflow_node_execution_repository.DifyAPISQLAlchemyWorkflowNodeExecutionRepository
  399. # API workflow run repository implementation
  400. API_WORKFLOW_RUN_REPOSITORY=repositories.sqlalchemy_api_workflow_run_repository.DifyAPISQLAlchemyWorkflowRunRepository
  401. # App configuration
  402. APP_MAX_EXECUTION_TIME=1200
  403. APP_MAX_ACTIVE_REQUESTS=0
  404. # Celery beat configuration
  405. CELERY_BEAT_SCHEDULER_TIME=1
  406. # Celery schedule tasks configuration
  407. ENABLE_CLEAN_EMBEDDING_CACHE_TASK=false
  408. ENABLE_CLEAN_UNUSED_DATASETS_TASK=false
  409. ENABLE_CREATE_TIDB_SERVERLESS_TASK=false
  410. ENABLE_UPDATE_TIDB_SERVERLESS_STATUS_TASK=false
  411. ENABLE_CLEAN_MESSAGES=false
  412. ENABLE_MAIL_CLEAN_DOCUMENT_NOTIFY_TASK=false
  413. ENABLE_DATASETS_QUEUE_MONITOR=false
  414. ENABLE_CHECK_UPGRADABLE_PLUGIN_TASK=true
  415. # Position configuration
  416. POSITION_TOOL_PINS=
  417. POSITION_TOOL_INCLUDES=
  418. POSITION_TOOL_EXCLUDES=
  419. POSITION_PROVIDER_PINS=
  420. POSITION_PROVIDER_INCLUDES=
  421. POSITION_PROVIDER_EXCLUDES=
  422. # Plugin configuration
  423. PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi
  424. PLUGIN_DAEMON_URL=http://127.0.0.1:5002
  425. PLUGIN_REMOTE_INSTALL_PORT=5003
  426. PLUGIN_REMOTE_INSTALL_HOST=localhost
  427. PLUGIN_MAX_PACKAGE_SIZE=15728640
  428. INNER_API_KEY_FOR_PLUGIN=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1
  429. # Marketplace configuration
  430. MARKETPLACE_ENABLED=true
  431. MARKETPLACE_API_URL=https://marketplace.dify.ai
  432. # Endpoint configuration
  433. ENDPOINT_URL_TEMPLATE=http://localhost:5002/e/{hook_id}
  434. # Reset password token expiry minutes
  435. RESET_PASSWORD_TOKEN_EXPIRY_MINUTES=5
  436. CHANGE_EMAIL_TOKEN_EXPIRY_MINUTES=5
  437. OWNER_TRANSFER_TOKEN_EXPIRY_MINUTES=5
  438. CREATE_TIDB_SERVICE_JOB_ENABLED=false
  439. # Maximum number of submitted thread count in a ThreadPool for parallel node execution
  440. MAX_SUBMIT_COUNT=100
  441. # Lockout duration in seconds
  442. LOGIN_LOCKOUT_DURATION=86400
  443. # Enable OpenTelemetry
  444. ENABLE_OTEL=false
  445. OTLP_TRACE_ENDPOINT=
  446. OTLP_METRIC_ENDPOINT=
  447. OTLP_BASE_ENDPOINT=http://localhost:4318
  448. OTLP_API_KEY=
  449. OTEL_EXPORTER_OTLP_PROTOCOL=
  450. OTEL_EXPORTER_TYPE=otlp
  451. OTEL_SAMPLING_RATE=0.1
  452. OTEL_BATCH_EXPORT_SCHEDULE_DELAY=5000
  453. OTEL_MAX_QUEUE_SIZE=2048
  454. OTEL_MAX_EXPORT_BATCH_SIZE=512
  455. OTEL_METRIC_EXPORT_INTERVAL=60000
  456. OTEL_BATCH_EXPORT_TIMEOUT=10000
  457. OTEL_METRIC_EXPORT_TIMEOUT=30000
  458. # Prevent Clickjacking
  459. ALLOW_EMBED=false
  460. # Dataset queue monitor configuration
  461. QUEUE_MONITOR_THRESHOLD=200
  462. # You can configure multiple ones, separated by commas. eg: test1@dify.ai,test2@dify.ai
  463. QUEUE_MONITOR_ALERT_EMAILS=
  464. # Monitor interval in minutes, default is 30 minutes
  465. QUEUE_MONITOR_INTERVAL=30