docker-compose.yaml 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. # ==================================================================
  2. # WARNING: This file is auto-generated by generate_docker_compose
  3. # Do not modify this file directly. Instead, update the .env.example
  4. # or docker-compose-template.yaml and regenerate this file.
  5. # ==================================================================
  6. x-shared-env: &shared-api-worker-env
  7. CONSOLE_API_URL: ${CONSOLE_API_URL:-}
  8. CONSOLE_WEB_URL: ${CONSOLE_WEB_URL:-}
  9. SERVICE_API_URL: ${SERVICE_API_URL:-}
  10. APP_API_URL: ${APP_API_URL:-}
  11. APP_WEB_URL: ${APP_WEB_URL:-}
  12. FILES_URL: ${FILES_URL:-}
  13. LOG_LEVEL: ${LOG_LEVEL:-INFO}
  14. LOG_FILE: ${LOG_FILE:-/app/logs/server.log}
  15. LOG_FILE_MAX_SIZE: ${LOG_FILE_MAX_SIZE:-20}
  16. LOG_FILE_BACKUP_COUNT: ${LOG_FILE_BACKUP_COUNT:-5}
  17. LOG_DATEFORMAT: ${LOG_DATEFORMAT:-%Y-%m-%d %H:%M:%S}
  18. LOG_TZ: ${LOG_TZ:-UTC}
  19. DEBUG: ${DEBUG:-false}
  20. FLASK_DEBUG: ${FLASK_DEBUG:-false}
  21. SECRET_KEY: ${SECRET_KEY:-sk-9f73s3ljTXVcMT3Blb3ljTqtsKiGHXVcMT3BlbkFJLK7U}
  22. INIT_PASSWORD: ${INIT_PASSWORD:-}
  23. DEPLOY_ENV: ${DEPLOY_ENV:-PRODUCTION}
  24. CHECK_UPDATE_URL: ${CHECK_UPDATE_URL:-https://updates.dify.ai}
  25. OPENAI_API_BASE: ${OPENAI_API_BASE:-https://api.openai.com/v1}
  26. MIGRATION_ENABLED: ${MIGRATION_ENABLED:-true}
  27. FILES_ACCESS_TIMEOUT: ${FILES_ACCESS_TIMEOUT:-300}
  28. ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
  29. REFRESH_TOKEN_EXPIRE_DAYS: ${REFRESH_TOKEN_EXPIRE_DAYS:-30}
  30. APP_MAX_ACTIVE_REQUESTS: ${APP_MAX_ACTIVE_REQUESTS:-0}
  31. APP_MAX_EXECUTION_TIME: ${APP_MAX_EXECUTION_TIME:-1200}
  32. DIFY_BIND_ADDRESS: ${DIFY_BIND_ADDRESS:-0.0.0.0}
  33. DIFY_PORT: ${DIFY_PORT:-5001}
  34. SERVER_WORKER_AMOUNT: ${SERVER_WORKER_AMOUNT:-1}
  35. SERVER_WORKER_CLASS: ${SERVER_WORKER_CLASS:-gevent}
  36. SERVER_WORKER_CONNECTIONS: ${SERVER_WORKER_CONNECTIONS:-10}
  37. CELERY_WORKER_CLASS: ${CELERY_WORKER_CLASS:-}
  38. GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-360}
  39. CELERY_WORKER_AMOUNT: ${CELERY_WORKER_AMOUNT:-}
  40. CELERY_AUTO_SCALE: ${CELERY_AUTO_SCALE:-false}
  41. CELERY_MAX_WORKERS: ${CELERY_MAX_WORKERS:-}
  42. CELERY_MIN_WORKERS: ${CELERY_MIN_WORKERS:-}
  43. API_TOOL_DEFAULT_CONNECT_TIMEOUT: ${API_TOOL_DEFAULT_CONNECT_TIMEOUT:-10}
  44. API_TOOL_DEFAULT_READ_TIMEOUT: ${API_TOOL_DEFAULT_READ_TIMEOUT:-60}
  45. DB_USERNAME: ${DB_USERNAME:-postgres}
  46. DB_PASSWORD: ${DB_PASSWORD:-difyai123456}
  47. DB_HOST: ${DB_HOST:-db}
  48. DB_PORT: ${DB_PORT:-5432}
  49. DB_DATABASE: ${DB_DATABASE:-dify}
  50. SQLALCHEMY_POOL_SIZE: ${SQLALCHEMY_POOL_SIZE:-30}
  51. SQLALCHEMY_POOL_RECYCLE: ${SQLALCHEMY_POOL_RECYCLE:-3600}
  52. SQLALCHEMY_ECHO: ${SQLALCHEMY_ECHO:-false}
  53. POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-100}
  54. POSTGRES_SHARED_BUFFERS: ${POSTGRES_SHARED_BUFFERS:-128MB}
  55. POSTGRES_WORK_MEM: ${POSTGRES_WORK_MEM:-4MB}
  56. POSTGRES_MAINTENANCE_WORK_MEM: ${POSTGRES_MAINTENANCE_WORK_MEM:-64MB}
  57. POSTGRES_EFFECTIVE_CACHE_SIZE: ${POSTGRES_EFFECTIVE_CACHE_SIZE:-4096MB}
  58. REDIS_HOST: ${REDIS_HOST:-redis}
  59. REDIS_PORT: ${REDIS_PORT:-6379}
  60. REDIS_USERNAME: ${REDIS_USERNAME:-}
  61. REDIS_PASSWORD: ${REDIS_PASSWORD:-difyai123456}
  62. REDIS_USE_SSL: ${REDIS_USE_SSL:-false}
  63. REDIS_DB: ${REDIS_DB:-0}
  64. REDIS_USE_SENTINEL: ${REDIS_USE_SENTINEL:-false}
  65. REDIS_SENTINELS: ${REDIS_SENTINELS:-}
  66. REDIS_SENTINEL_SERVICE_NAME: ${REDIS_SENTINEL_SERVICE_NAME:-}
  67. REDIS_SENTINEL_USERNAME: ${REDIS_SENTINEL_USERNAME:-}
  68. REDIS_SENTINEL_PASSWORD: ${REDIS_SENTINEL_PASSWORD:-}
  69. REDIS_SENTINEL_SOCKET_TIMEOUT: ${REDIS_SENTINEL_SOCKET_TIMEOUT:-0.1}
  70. REDIS_USE_CLUSTERS: ${REDIS_USE_CLUSTERS:-false}
  71. REDIS_CLUSTERS: ${REDIS_CLUSTERS:-}
  72. REDIS_CLUSTERS_PASSWORD: ${REDIS_CLUSTERS_PASSWORD:-}
  73. CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://:difyai123456@redis:6379/1}
  74. BROKER_USE_SSL: ${BROKER_USE_SSL:-false}
  75. CELERY_USE_SENTINEL: ${CELERY_USE_SENTINEL:-false}
  76. CELERY_SENTINEL_MASTER_NAME: ${CELERY_SENTINEL_MASTER_NAME:-}
  77. CELERY_SENTINEL_SOCKET_TIMEOUT: ${CELERY_SENTINEL_SOCKET_TIMEOUT:-0.1}
  78. WEB_API_CORS_ALLOW_ORIGINS: ${WEB_API_CORS_ALLOW_ORIGINS:-*}
  79. CONSOLE_CORS_ALLOW_ORIGINS: ${CONSOLE_CORS_ALLOW_ORIGINS:-*}
  80. STORAGE_TYPE: ${STORAGE_TYPE:-opendal}
  81. OPENDAL_SCHEME: ${OPENDAL_SCHEME:-fs}
  82. OPENDAL_FS_ROOT: ${OPENDAL_FS_ROOT:-storage}
  83. S3_ENDPOINT: ${S3_ENDPOINT:-}
  84. S3_REGION: ${S3_REGION:-us-east-1}
  85. S3_BUCKET_NAME: ${S3_BUCKET_NAME:-difyai}
  86. S3_ACCESS_KEY: ${S3_ACCESS_KEY:-}
  87. S3_SECRET_KEY: ${S3_SECRET_KEY:-}
  88. S3_USE_AWS_MANAGED_IAM: ${S3_USE_AWS_MANAGED_IAM:-false}
  89. AZURE_BLOB_ACCOUNT_NAME: ${AZURE_BLOB_ACCOUNT_NAME:-difyai}
  90. AZURE_BLOB_ACCOUNT_KEY: ${AZURE_BLOB_ACCOUNT_KEY:-difyai}
  91. AZURE_BLOB_CONTAINER_NAME: ${AZURE_BLOB_CONTAINER_NAME:-difyai-container}
  92. AZURE_BLOB_ACCOUNT_URL: ${AZURE_BLOB_ACCOUNT_URL:-https://<your_account_name>.blob.core.windows.net}
  93. GOOGLE_STORAGE_BUCKET_NAME: ${GOOGLE_STORAGE_BUCKET_NAME:-your-bucket-name}
  94. GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64: ${GOOGLE_STORAGE_SERVICE_ACCOUNT_JSON_BASE64:-}
  95. ALIYUN_OSS_BUCKET_NAME: ${ALIYUN_OSS_BUCKET_NAME:-your-bucket-name}
  96. ALIYUN_OSS_ACCESS_KEY: ${ALIYUN_OSS_ACCESS_KEY:-your-access-key}
  97. ALIYUN_OSS_SECRET_KEY: ${ALIYUN_OSS_SECRET_KEY:-your-secret-key}
  98. ALIYUN_OSS_ENDPOINT: ${ALIYUN_OSS_ENDPOINT:-https://oss-ap-southeast-1-internal.aliyuncs.com}
  99. ALIYUN_OSS_REGION: ${ALIYUN_OSS_REGION:-ap-southeast-1}
  100. ALIYUN_OSS_AUTH_VERSION: ${ALIYUN_OSS_AUTH_VERSION:-v4}
  101. ALIYUN_OSS_PATH: ${ALIYUN_OSS_PATH:-your-path}
  102. TENCENT_COS_BUCKET_NAME: ${TENCENT_COS_BUCKET_NAME:-your-bucket-name}
  103. TENCENT_COS_SECRET_KEY: ${TENCENT_COS_SECRET_KEY:-your-secret-key}
  104. TENCENT_COS_SECRET_ID: ${TENCENT_COS_SECRET_ID:-your-secret-id}
  105. TENCENT_COS_REGION: ${TENCENT_COS_REGION:-your-region}
  106. TENCENT_COS_SCHEME: ${TENCENT_COS_SCHEME:-your-scheme}
  107. OCI_ENDPOINT: ${OCI_ENDPOINT:-https://your-object-storage-namespace.compat.objectstorage.us-ashburn-1.oraclecloud.com}
  108. OCI_BUCKET_NAME: ${OCI_BUCKET_NAME:-your-bucket-name}
  109. OCI_ACCESS_KEY: ${OCI_ACCESS_KEY:-your-access-key}
  110. OCI_SECRET_KEY: ${OCI_SECRET_KEY:-your-secret-key}
  111. OCI_REGION: ${OCI_REGION:-us-ashburn-1}
  112. HUAWEI_OBS_BUCKET_NAME: ${HUAWEI_OBS_BUCKET_NAME:-your-bucket-name}
  113. HUAWEI_OBS_SECRET_KEY: ${HUAWEI_OBS_SECRET_KEY:-your-secret-key}
  114. HUAWEI_OBS_ACCESS_KEY: ${HUAWEI_OBS_ACCESS_KEY:-your-access-key}
  115. HUAWEI_OBS_SERVER: ${HUAWEI_OBS_SERVER:-your-server-url}
  116. VOLCENGINE_TOS_BUCKET_NAME: ${VOLCENGINE_TOS_BUCKET_NAME:-your-bucket-name}
  117. VOLCENGINE_TOS_SECRET_KEY: ${VOLCENGINE_TOS_SECRET_KEY:-your-secret-key}
  118. VOLCENGINE_TOS_ACCESS_KEY: ${VOLCENGINE_TOS_ACCESS_KEY:-your-access-key}
  119. VOLCENGINE_TOS_ENDPOINT: ${VOLCENGINE_TOS_ENDPOINT:-your-server-url}
  120. VOLCENGINE_TOS_REGION: ${VOLCENGINE_TOS_REGION:-your-region}
  121. BAIDU_OBS_BUCKET_NAME: ${BAIDU_OBS_BUCKET_NAME:-your-bucket-name}
  122. BAIDU_OBS_SECRET_KEY: ${BAIDU_OBS_SECRET_KEY:-your-secret-key}
  123. BAIDU_OBS_ACCESS_KEY: ${BAIDU_OBS_ACCESS_KEY:-your-access-key}
  124. BAIDU_OBS_ENDPOINT: ${BAIDU_OBS_ENDPOINT:-your-server-url}
  125. SUPABASE_BUCKET_NAME: ${SUPABASE_BUCKET_NAME:-your-bucket-name}
  126. SUPABASE_API_KEY: ${SUPABASE_API_KEY:-your-access-key}
  127. SUPABASE_URL: ${SUPABASE_URL:-your-server-url}
  128. VECTOR_STORE: ${VECTOR_STORE:-weaviate}
  129. WEAVIATE_ENDPOINT: ${WEAVIATE_ENDPOINT:-http://weaviate:8080}
  130. WEAVIATE_API_KEY: ${WEAVIATE_API_KEY:-WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih}
  131. QDRANT_URL: ${QDRANT_URL:-http://qdrant:6333}
  132. QDRANT_API_KEY: ${QDRANT_API_KEY:-difyai123456}
  133. QDRANT_CLIENT_TIMEOUT: ${QDRANT_CLIENT_TIMEOUT:-20}
  134. QDRANT_GRPC_ENABLED: ${QDRANT_GRPC_ENABLED:-false}
  135. QDRANT_GRPC_PORT: ${QDRANT_GRPC_PORT:-6334}
  136. MILVUS_URI: ${MILVUS_URI:-http://host.docker.internal:19530}
  137. MILVUS_TOKEN: ${MILVUS_TOKEN:-}
  138. MILVUS_USER: ${MILVUS_USER:-}
  139. MILVUS_PASSWORD: ${MILVUS_PASSWORD:-}
  140. MILVUS_ENABLE_HYBRID_SEARCH: ${MILVUS_ENABLE_HYBRID_SEARCH:-False}
  141. MYSCALE_HOST: ${MYSCALE_HOST:-myscale}
  142. MYSCALE_PORT: ${MYSCALE_PORT:-8123}
  143. MYSCALE_USER: ${MYSCALE_USER:-default}
  144. MYSCALE_PASSWORD: ${MYSCALE_PASSWORD:-}
  145. MYSCALE_DATABASE: ${MYSCALE_DATABASE:-dify}
  146. MYSCALE_FTS_PARAMS: ${MYSCALE_FTS_PARAMS:-}
  147. COUCHBASE_CONNECTION_STRING: ${COUCHBASE_CONNECTION_STRING:-couchbase://couchbase-server}
  148. COUCHBASE_USER: ${COUCHBASE_USER:-Administrator}
  149. COUCHBASE_PASSWORD: ${COUCHBASE_PASSWORD:-password}
  150. COUCHBASE_BUCKET_NAME: ${COUCHBASE_BUCKET_NAME:-Embeddings}
  151. COUCHBASE_SCOPE_NAME: ${COUCHBASE_SCOPE_NAME:-_default}
  152. PGVECTOR_HOST: ${PGVECTOR_HOST:-pgvector}
  153. PGVECTOR_PORT: ${PGVECTOR_PORT:-5432}
  154. PGVECTOR_USER: ${PGVECTOR_USER:-postgres}
  155. PGVECTOR_PASSWORD: ${PGVECTOR_PASSWORD:-difyai123456}
  156. PGVECTOR_DATABASE: ${PGVECTOR_DATABASE:-dify}
  157. PGVECTOR_MIN_CONNECTION: ${PGVECTOR_MIN_CONNECTION:-1}
  158. PGVECTOR_MAX_CONNECTION: ${PGVECTOR_MAX_CONNECTION:-5}
  159. PGVECTOR_PG_BIGM: ${PGVECTOR_PG_BIGM:-false}
  160. PGVECTOR_PG_BIGM_VERSION: ${PGVECTOR_PG_BIGM_VERSION:-1.2-20240606}
  161. PGVECTO_RS_HOST: ${PGVECTO_RS_HOST:-pgvecto-rs}
  162. PGVECTO_RS_PORT: ${PGVECTO_RS_PORT:-5432}
  163. PGVECTO_RS_USER: ${PGVECTO_RS_USER:-postgres}
  164. PGVECTO_RS_PASSWORD: ${PGVECTO_RS_PASSWORD:-difyai123456}
  165. PGVECTO_RS_DATABASE: ${PGVECTO_RS_DATABASE:-dify}
  166. ANALYTICDB_KEY_ID: ${ANALYTICDB_KEY_ID:-your-ak}
  167. ANALYTICDB_KEY_SECRET: ${ANALYTICDB_KEY_SECRET:-your-sk}
  168. ANALYTICDB_REGION_ID: ${ANALYTICDB_REGION_ID:-cn-hangzhou}
  169. ANALYTICDB_INSTANCE_ID: ${ANALYTICDB_INSTANCE_ID:-gp-ab123456}
  170. ANALYTICDB_ACCOUNT: ${ANALYTICDB_ACCOUNT:-testaccount}
  171. ANALYTICDB_PASSWORD: ${ANALYTICDB_PASSWORD:-testpassword}
  172. ANALYTICDB_NAMESPACE: ${ANALYTICDB_NAMESPACE:-dify}
  173. ANALYTICDB_NAMESPACE_PASSWORD: ${ANALYTICDB_NAMESPACE_PASSWORD:-difypassword}
  174. ANALYTICDB_HOST: ${ANALYTICDB_HOST:-gp-test.aliyuncs.com}
  175. ANALYTICDB_PORT: ${ANALYTICDB_PORT:-5432}
  176. ANALYTICDB_MIN_CONNECTION: ${ANALYTICDB_MIN_CONNECTION:-1}
  177. ANALYTICDB_MAX_CONNECTION: ${ANALYTICDB_MAX_CONNECTION:-5}
  178. TIDB_VECTOR_HOST: ${TIDB_VECTOR_HOST:-tidb}
  179. TIDB_VECTOR_PORT: ${TIDB_VECTOR_PORT:-4000}
  180. TIDB_VECTOR_USER: ${TIDB_VECTOR_USER:-}
  181. TIDB_VECTOR_PASSWORD: ${TIDB_VECTOR_PASSWORD:-}
  182. TIDB_VECTOR_DATABASE: ${TIDB_VECTOR_DATABASE:-dify}
  183. TIDB_ON_QDRANT_URL: ${TIDB_ON_QDRANT_URL:-http://127.0.0.1}
  184. TIDB_ON_QDRANT_API_KEY: ${TIDB_ON_QDRANT_API_KEY:-dify}
  185. TIDB_ON_QDRANT_CLIENT_TIMEOUT: ${TIDB_ON_QDRANT_CLIENT_TIMEOUT:-20}
  186. TIDB_ON_QDRANT_GRPC_ENABLED: ${TIDB_ON_QDRANT_GRPC_ENABLED:-false}
  187. TIDB_ON_QDRANT_GRPC_PORT: ${TIDB_ON_QDRANT_GRPC_PORT:-6334}
  188. TIDB_PUBLIC_KEY: ${TIDB_PUBLIC_KEY:-dify}
  189. TIDB_PRIVATE_KEY: ${TIDB_PRIVATE_KEY:-dify}
  190. TIDB_API_URL: ${TIDB_API_URL:-http://127.0.0.1}
  191. TIDB_IAM_API_URL: ${TIDB_IAM_API_URL:-http://127.0.0.1}
  192. TIDB_REGION: ${TIDB_REGION:-regions/aws-us-east-1}
  193. TIDB_PROJECT_ID: ${TIDB_PROJECT_ID:-dify}
  194. TIDB_SPEND_LIMIT: ${TIDB_SPEND_LIMIT:-100}
  195. CHROMA_HOST: ${CHROMA_HOST:-127.0.0.1}
  196. CHROMA_PORT: ${CHROMA_PORT:-8000}
  197. CHROMA_TENANT: ${CHROMA_TENANT:-default_tenant}
  198. CHROMA_DATABASE: ${CHROMA_DATABASE:-default_database}
  199. CHROMA_AUTH_PROVIDER: ${CHROMA_AUTH_PROVIDER:-chromadb.auth.token_authn.TokenAuthClientProvider}
  200. CHROMA_AUTH_CREDENTIALS: ${CHROMA_AUTH_CREDENTIALS:-}
  201. ORACLE_USER: ${ORACLE_USER:-dify}
  202. ORACLE_PASSWORD: ${ORACLE_PASSWORD:-dify}
  203. ORACLE_DSN: ${ORACLE_DSN:-oracle:1521/FREEPDB1}
  204. ORACLE_CONFIG_DIR: ${ORACLE_CONFIG_DIR:-/app/api/storage/wallet}
  205. ORACLE_WALLET_LOCATION: ${ORACLE_WALLET_LOCATION:-/app/api/storage/wallet}
  206. ORACLE_WALLET_PASSWORD: ${ORACLE_WALLET_PASSWORD:-dify}
  207. ORACLE_IS_AUTONOMOUS: ${ORACLE_IS_AUTONOMOUS:-false}
  208. RELYT_HOST: ${RELYT_HOST:-db}
  209. RELYT_PORT: ${RELYT_PORT:-5432}
  210. RELYT_USER: ${RELYT_USER:-postgres}
  211. RELYT_PASSWORD: ${RELYT_PASSWORD:-difyai123456}
  212. RELYT_DATABASE: ${RELYT_DATABASE:-postgres}
  213. OPENSEARCH_HOST: ${OPENSEARCH_HOST:-opensearch}
  214. OPENSEARCH_PORT: ${OPENSEARCH_PORT:-9200}
  215. OPENSEARCH_USER: ${OPENSEARCH_USER:-admin}
  216. OPENSEARCH_PASSWORD: ${OPENSEARCH_PASSWORD:-admin}
  217. OPENSEARCH_SECURE: ${OPENSEARCH_SECURE:-true}
  218. TENCENT_VECTOR_DB_URL: ${TENCENT_VECTOR_DB_URL:-http://127.0.0.1}
  219. TENCENT_VECTOR_DB_API_KEY: ${TENCENT_VECTOR_DB_API_KEY:-dify}
  220. TENCENT_VECTOR_DB_TIMEOUT: ${TENCENT_VECTOR_DB_TIMEOUT:-30}
  221. TENCENT_VECTOR_DB_USERNAME: ${TENCENT_VECTOR_DB_USERNAME:-dify}
  222. TENCENT_VECTOR_DB_DATABASE: ${TENCENT_VECTOR_DB_DATABASE:-dify}
  223. TENCENT_VECTOR_DB_SHARD: ${TENCENT_VECTOR_DB_SHARD:-1}
  224. TENCENT_VECTOR_DB_REPLICAS: ${TENCENT_VECTOR_DB_REPLICAS:-2}
  225. ELASTICSEARCH_HOST: ${ELASTICSEARCH_HOST:-0.0.0.0}
  226. ELASTICSEARCH_PORT: ${ELASTICSEARCH_PORT:-9200}
  227. ELASTICSEARCH_USERNAME: ${ELASTICSEARCH_USERNAME:-elastic}
  228. ELASTICSEARCH_PASSWORD: ${ELASTICSEARCH_PASSWORD:-elastic}
  229. KIBANA_PORT: ${KIBANA_PORT:-5601}
  230. BAIDU_VECTOR_DB_ENDPOINT: ${BAIDU_VECTOR_DB_ENDPOINT:-http://127.0.0.1:5287}
  231. BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS: ${BAIDU_VECTOR_DB_CONNECTION_TIMEOUT_MS:-30000}
  232. BAIDU_VECTOR_DB_ACCOUNT: ${BAIDU_VECTOR_DB_ACCOUNT:-root}
  233. BAIDU_VECTOR_DB_API_KEY: ${BAIDU_VECTOR_DB_API_KEY:-dify}
  234. BAIDU_VECTOR_DB_DATABASE: ${BAIDU_VECTOR_DB_DATABASE:-dify}
  235. BAIDU_VECTOR_DB_SHARD: ${BAIDU_VECTOR_DB_SHARD:-1}
  236. BAIDU_VECTOR_DB_REPLICAS: ${BAIDU_VECTOR_DB_REPLICAS:-3}
  237. VIKINGDB_ACCESS_KEY: ${VIKINGDB_ACCESS_KEY:-your-ak}
  238. VIKINGDB_SECRET_KEY: ${VIKINGDB_SECRET_KEY:-your-sk}
  239. VIKINGDB_REGION: ${VIKINGDB_REGION:-cn-shanghai}
  240. VIKINGDB_HOST: ${VIKINGDB_HOST:-api-vikingdb.xxx.volces.com}
  241. VIKINGDB_SCHEMA: ${VIKINGDB_SCHEMA:-http}
  242. VIKINGDB_CONNECTION_TIMEOUT: ${VIKINGDB_CONNECTION_TIMEOUT:-30}
  243. VIKINGDB_SOCKET_TIMEOUT: ${VIKINGDB_SOCKET_TIMEOUT:-30}
  244. LINDORM_URL: ${LINDORM_URL:-http://lindorm:30070}
  245. LINDORM_USERNAME: ${LINDORM_USERNAME:-lindorm}
  246. LINDORM_PASSWORD: ${LINDORM_PASSWORD:-lindorm}
  247. OCEANBASE_VECTOR_HOST: ${OCEANBASE_VECTOR_HOST:-oceanbase}
  248. OCEANBASE_VECTOR_PORT: ${OCEANBASE_VECTOR_PORT:-2881}
  249. OCEANBASE_VECTOR_USER: ${OCEANBASE_VECTOR_USER:-root@test}
  250. OCEANBASE_VECTOR_PASSWORD: ${OCEANBASE_VECTOR_PASSWORD:-difyai123456}
  251. OCEANBASE_VECTOR_DATABASE: ${OCEANBASE_VECTOR_DATABASE:-test}
  252. OCEANBASE_CLUSTER_NAME: ${OCEANBASE_CLUSTER_NAME:-difyai}
  253. OCEANBASE_MEMORY_LIMIT: ${OCEANBASE_MEMORY_LIMIT:-6G}
  254. OPENGAUSS_HOST: ${OPENGAUSS_HOST:-opengauss}
  255. OPENGAUSS_PORT: ${OPENGAUSS_PORT:-6600}
  256. OPENGAUSS_USER: ${OPENGAUSS_USER:-postgres}
  257. OPENGAUSS_PASSWORD: ${OPENGAUSS_PASSWORD:-Dify@123}
  258. OPENGAUSS_DATABASE: ${OPENGAUSS_DATABASE:-dify}
  259. OPENGAUSS_MIN_CONNECTION: ${OPENGAUSS_MIN_CONNECTION:-1}
  260. OPENGAUSS_MAX_CONNECTION: ${OPENGAUSS_MAX_CONNECTION:-5}
  261. OPENGAUSS_ENABLE_PQ: ${OPENGAUSS_ENABLE_PQ:-false}
  262. UPSTASH_VECTOR_URL: ${UPSTASH_VECTOR_URL:-https://xxx-vector.upstash.io}
  263. UPSTASH_VECTOR_TOKEN: ${UPSTASH_VECTOR_TOKEN:-dify}
  264. UPLOAD_FILE_SIZE_LIMIT: ${UPLOAD_FILE_SIZE_LIMIT:-15}
  265. UPLOAD_FILE_BATCH_LIMIT: ${UPLOAD_FILE_BATCH_LIMIT:-5}
  266. ETL_TYPE: ${ETL_TYPE:-dify}
  267. UNSTRUCTURED_API_URL: ${UNSTRUCTURED_API_URL:-}
  268. UNSTRUCTURED_API_KEY: ${UNSTRUCTURED_API_KEY:-}
  269. SCARF_NO_ANALYTICS: ${SCARF_NO_ANALYTICS:-true}
  270. PROMPT_GENERATION_MAX_TOKENS: ${PROMPT_GENERATION_MAX_TOKENS:-512}
  271. CODE_GENERATION_MAX_TOKENS: ${CODE_GENERATION_MAX_TOKENS:-1024}
  272. MULTIMODAL_SEND_FORMAT: ${MULTIMODAL_SEND_FORMAT:-base64}
  273. UPLOAD_IMAGE_FILE_SIZE_LIMIT: ${UPLOAD_IMAGE_FILE_SIZE_LIMIT:-10}
  274. UPLOAD_VIDEO_FILE_SIZE_LIMIT: ${UPLOAD_VIDEO_FILE_SIZE_LIMIT:-100}
  275. UPLOAD_AUDIO_FILE_SIZE_LIMIT: ${UPLOAD_AUDIO_FILE_SIZE_LIMIT:-50}
  276. SENTRY_DSN: ${SENTRY_DSN:-}
  277. API_SENTRY_DSN: ${API_SENTRY_DSN:-}
  278. API_SENTRY_TRACES_SAMPLE_RATE: ${API_SENTRY_TRACES_SAMPLE_RATE:-1.0}
  279. API_SENTRY_PROFILES_SAMPLE_RATE: ${API_SENTRY_PROFILES_SAMPLE_RATE:-1.0}
  280. WEB_SENTRY_DSN: ${WEB_SENTRY_DSN:-}
  281. NOTION_INTEGRATION_TYPE: ${NOTION_INTEGRATION_TYPE:-public}
  282. NOTION_CLIENT_SECRET: ${NOTION_CLIENT_SECRET:-}
  283. NOTION_CLIENT_ID: ${NOTION_CLIENT_ID:-}
  284. NOTION_INTERNAL_SECRET: ${NOTION_INTERNAL_SECRET:-}
  285. MAIL_TYPE: ${MAIL_TYPE:-resend}
  286. MAIL_DEFAULT_SEND_FROM: ${MAIL_DEFAULT_SEND_FROM:-}
  287. RESEND_API_URL: ${RESEND_API_URL:-https://api.resend.com}
  288. RESEND_API_KEY: ${RESEND_API_KEY:-your-resend-api-key}
  289. SMTP_SERVER: ${SMTP_SERVER:-}
  290. SMTP_PORT: ${SMTP_PORT:-465}
  291. SMTP_USERNAME: ${SMTP_USERNAME:-}
  292. SMTP_PASSWORD: ${SMTP_PASSWORD:-}
  293. SMTP_USE_TLS: ${SMTP_USE_TLS:-true}
  294. SMTP_OPPORTUNISTIC_TLS: ${SMTP_OPPORTUNISTIC_TLS:-false}
  295. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-4000}
  296. INVITE_EXPIRY_HOURS: ${INVITE_EXPIRY_HOURS:-72}
  297. RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: ${RESET_PASSWORD_TOKEN_EXPIRY_MINUTES:-5}
  298. CODE_EXECUTION_ENDPOINT: ${CODE_EXECUTION_ENDPOINT:-http://sandbox:8194}
  299. CODE_EXECUTION_API_KEY: ${CODE_EXECUTION_API_KEY:-dify-sandbox}
  300. CODE_MAX_NUMBER: ${CODE_MAX_NUMBER:-9223372036854775807}
  301. CODE_MIN_NUMBER: ${CODE_MIN_NUMBER:--9223372036854775808}
  302. CODE_MAX_DEPTH: ${CODE_MAX_DEPTH:-5}
  303. CODE_MAX_PRECISION: ${CODE_MAX_PRECISION:-20}
  304. CODE_MAX_STRING_LENGTH: ${CODE_MAX_STRING_LENGTH:-80000}
  305. CODE_MAX_STRING_ARRAY_LENGTH: ${CODE_MAX_STRING_ARRAY_LENGTH:-30}
  306. CODE_MAX_OBJECT_ARRAY_LENGTH: ${CODE_MAX_OBJECT_ARRAY_LENGTH:-30}
  307. CODE_MAX_NUMBER_ARRAY_LENGTH: ${CODE_MAX_NUMBER_ARRAY_LENGTH:-1000}
  308. CODE_EXECUTION_CONNECT_TIMEOUT: ${CODE_EXECUTION_CONNECT_TIMEOUT:-10}
  309. CODE_EXECUTION_READ_TIMEOUT: ${CODE_EXECUTION_READ_TIMEOUT:-60}
  310. CODE_EXECUTION_WRITE_TIMEOUT: ${CODE_EXECUTION_WRITE_TIMEOUT:-10}
  311. TEMPLATE_TRANSFORM_MAX_LENGTH: ${TEMPLATE_TRANSFORM_MAX_LENGTH:-80000}
  312. WORKFLOW_MAX_EXECUTION_STEPS: ${WORKFLOW_MAX_EXECUTION_STEPS:-500}
  313. WORKFLOW_MAX_EXECUTION_TIME: ${WORKFLOW_MAX_EXECUTION_TIME:-1200}
  314. WORKFLOW_CALL_MAX_DEPTH: ${WORKFLOW_CALL_MAX_DEPTH:-5}
  315. MAX_VARIABLE_SIZE: ${MAX_VARIABLE_SIZE:-204800}
  316. WORKFLOW_PARALLEL_DEPTH_LIMIT: ${WORKFLOW_PARALLEL_DEPTH_LIMIT:-3}
  317. WORKFLOW_FILE_UPLOAD_LIMIT: ${WORKFLOW_FILE_UPLOAD_LIMIT:-10}
  318. HTTP_REQUEST_NODE_MAX_BINARY_SIZE: ${HTTP_REQUEST_NODE_MAX_BINARY_SIZE:-10485760}
  319. HTTP_REQUEST_NODE_MAX_TEXT_SIZE: ${HTTP_REQUEST_NODE_MAX_TEXT_SIZE:-1048576}
  320. HTTP_REQUEST_NODE_SSL_VERIFY: ${HTTP_REQUEST_NODE_SSL_VERIFY:-True}
  321. SSRF_PROXY_HTTP_URL: ${SSRF_PROXY_HTTP_URL:-http://ssrf_proxy:3128}
  322. SSRF_PROXY_HTTPS_URL: ${SSRF_PROXY_HTTPS_URL:-http://ssrf_proxy:3128}
  323. LOOP_NODE_MAX_COUNT: ${LOOP_NODE_MAX_COUNT:-100}
  324. MAX_TOOLS_NUM: ${MAX_TOOLS_NUM:-10}
  325. MAX_PARALLEL_LIMIT: ${MAX_PARALLEL_LIMIT:-10}
  326. TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}
  327. PGUSER: ${PGUSER:-${DB_USERNAME}}
  328. POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-${DB_PASSWORD}}
  329. POSTGRES_DB: ${POSTGRES_DB:-${DB_DATABASE}}
  330. PGDATA: ${PGDATA:-/var/lib/postgresql/data/pgdata}
  331. SANDBOX_API_KEY: ${SANDBOX_API_KEY:-dify-sandbox}
  332. SANDBOX_GIN_MODE: ${SANDBOX_GIN_MODE:-release}
  333. SANDBOX_WORKER_TIMEOUT: ${SANDBOX_WORKER_TIMEOUT:-15}
  334. SANDBOX_ENABLE_NETWORK: ${SANDBOX_ENABLE_NETWORK:-true}
  335. SANDBOX_HTTP_PROXY: ${SANDBOX_HTTP_PROXY:-http://ssrf_proxy:3128}
  336. SANDBOX_HTTPS_PROXY: ${SANDBOX_HTTPS_PROXY:-http://ssrf_proxy:3128}
  337. SANDBOX_PORT: ${SANDBOX_PORT:-8194}
  338. WEAVIATE_PERSISTENCE_DATA_PATH: ${WEAVIATE_PERSISTENCE_DATA_PATH:-/var/lib/weaviate}
  339. WEAVIATE_QUERY_DEFAULTS_LIMIT: ${WEAVIATE_QUERY_DEFAULTS_LIMIT:-25}
  340. WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ${WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED:-true}
  341. WEAVIATE_DEFAULT_VECTORIZER_MODULE: ${WEAVIATE_DEFAULT_VECTORIZER_MODULE:-none}
  342. WEAVIATE_CLUSTER_HOSTNAME: ${WEAVIATE_CLUSTER_HOSTNAME:-node1}
  343. WEAVIATE_AUTHENTICATION_APIKEY_ENABLED: ${WEAVIATE_AUTHENTICATION_APIKEY_ENABLED:-true}
  344. WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS: ${WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS:-WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih}
  345. WEAVIATE_AUTHENTICATION_APIKEY_USERS: ${WEAVIATE_AUTHENTICATION_APIKEY_USERS:-hello@dify.ai}
  346. WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED: ${WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED:-true}
  347. WEAVIATE_AUTHORIZATION_ADMINLIST_USERS: ${WEAVIATE_AUTHORIZATION_ADMINLIST_USERS:-hello@dify.ai}
  348. CHROMA_SERVER_AUTHN_CREDENTIALS: ${CHROMA_SERVER_AUTHN_CREDENTIALS:-difyai123456}
  349. CHROMA_SERVER_AUTHN_PROVIDER: ${CHROMA_SERVER_AUTHN_PROVIDER:-chromadb.auth.token_authn.TokenAuthenticationServerProvider}
  350. CHROMA_IS_PERSISTENT: ${CHROMA_IS_PERSISTENT:-TRUE}
  351. ORACLE_PWD: ${ORACLE_PWD:-Dify123456}
  352. ORACLE_CHARACTERSET: ${ORACLE_CHARACTERSET:-AL32UTF8}
  353. ETCD_AUTO_COMPACTION_MODE: ${ETCD_AUTO_COMPACTION_MODE:-revision}
  354. ETCD_AUTO_COMPACTION_RETENTION: ${ETCD_AUTO_COMPACTION_RETENTION:-1000}
  355. ETCD_QUOTA_BACKEND_BYTES: ${ETCD_QUOTA_BACKEND_BYTES:-4294967296}
  356. ETCD_SNAPSHOT_COUNT: ${ETCD_SNAPSHOT_COUNT:-50000}
  357. MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
  358. MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
  359. ETCD_ENDPOINTS: ${ETCD_ENDPOINTS:-etcd:2379}
  360. MINIO_ADDRESS: ${MINIO_ADDRESS:-minio:9000}
  361. MILVUS_AUTHORIZATION_ENABLED: ${MILVUS_AUTHORIZATION_ENABLED:-true}
  362. PGVECTOR_PGUSER: ${PGVECTOR_PGUSER:-postgres}
  363. PGVECTOR_POSTGRES_PASSWORD: ${PGVECTOR_POSTGRES_PASSWORD:-difyai123456}
  364. PGVECTOR_POSTGRES_DB: ${PGVECTOR_POSTGRES_DB:-dify}
  365. PGVECTOR_PGDATA: ${PGVECTOR_PGDATA:-/var/lib/postgresql/data/pgdata}
  366. OPENSEARCH_DISCOVERY_TYPE: ${OPENSEARCH_DISCOVERY_TYPE:-single-node}
  367. OPENSEARCH_BOOTSTRAP_MEMORY_LOCK: ${OPENSEARCH_BOOTSTRAP_MEMORY_LOCK:-true}
  368. OPENSEARCH_JAVA_OPTS_MIN: ${OPENSEARCH_JAVA_OPTS_MIN:-512m}
  369. OPENSEARCH_JAVA_OPTS_MAX: ${OPENSEARCH_JAVA_OPTS_MAX:-1024m}
  370. OPENSEARCH_INITIAL_ADMIN_PASSWORD: ${OPENSEARCH_INITIAL_ADMIN_PASSWORD:-Qazwsxedc!@#123}
  371. OPENSEARCH_MEMLOCK_SOFT: ${OPENSEARCH_MEMLOCK_SOFT:--1}
  372. OPENSEARCH_MEMLOCK_HARD: ${OPENSEARCH_MEMLOCK_HARD:--1}
  373. OPENSEARCH_NOFILE_SOFT: ${OPENSEARCH_NOFILE_SOFT:-65536}
  374. OPENSEARCH_NOFILE_HARD: ${OPENSEARCH_NOFILE_HARD:-65536}
  375. NGINX_SERVER_NAME: ${NGINX_SERVER_NAME:-_}
  376. NGINX_HTTPS_ENABLED: ${NGINX_HTTPS_ENABLED:-false}
  377. NGINX_PORT: ${NGINX_PORT:-80}
  378. NGINX_SSL_PORT: ${NGINX_SSL_PORT:-443}
  379. NGINX_SSL_CERT_FILENAME: ${NGINX_SSL_CERT_FILENAME:-dify.crt}
  380. NGINX_SSL_CERT_KEY_FILENAME: ${NGINX_SSL_CERT_KEY_FILENAME:-dify.key}
  381. NGINX_SSL_PROTOCOLS: ${NGINX_SSL_PROTOCOLS:-TLSv1.1 TLSv1.2 TLSv1.3}
  382. NGINX_WORKER_PROCESSES: ${NGINX_WORKER_PROCESSES:-auto}
  383. NGINX_CLIENT_MAX_BODY_SIZE: ${NGINX_CLIENT_MAX_BODY_SIZE:-15M}
  384. NGINX_KEEPALIVE_TIMEOUT: ${NGINX_KEEPALIVE_TIMEOUT:-65}
  385. NGINX_PROXY_READ_TIMEOUT: ${NGINX_PROXY_READ_TIMEOUT:-3600s}
  386. NGINX_PROXY_SEND_TIMEOUT: ${NGINX_PROXY_SEND_TIMEOUT:-3600s}
  387. NGINX_ENABLE_CERTBOT_CHALLENGE: ${NGINX_ENABLE_CERTBOT_CHALLENGE:-false}
  388. CERTBOT_EMAIL: ${CERTBOT_EMAIL:-your_email@example.com}
  389. CERTBOT_DOMAIN: ${CERTBOT_DOMAIN:-your_domain.com}
  390. CERTBOT_OPTIONS: ${CERTBOT_OPTIONS:-}
  391. SSRF_HTTP_PORT: ${SSRF_HTTP_PORT:-3128}
  392. SSRF_COREDUMP_DIR: ${SSRF_COREDUMP_DIR:-/var/spool/squid}
  393. SSRF_REVERSE_PROXY_PORT: ${SSRF_REVERSE_PROXY_PORT:-8194}
  394. SSRF_SANDBOX_HOST: ${SSRF_SANDBOX_HOST:-sandbox}
  395. SSRF_DEFAULT_TIME_OUT: ${SSRF_DEFAULT_TIME_OUT:-5}
  396. SSRF_DEFAULT_CONNECT_TIME_OUT: ${SSRF_DEFAULT_CONNECT_TIME_OUT:-5}
  397. SSRF_DEFAULT_READ_TIME_OUT: ${SSRF_DEFAULT_READ_TIME_OUT:-5}
  398. SSRF_DEFAULT_WRITE_TIME_OUT: ${SSRF_DEFAULT_WRITE_TIME_OUT:-5}
  399. EXPOSE_NGINX_PORT: ${EXPOSE_NGINX_PORT:-80}
  400. EXPOSE_NGINX_SSL_PORT: ${EXPOSE_NGINX_SSL_PORT:-443}
  401. POSITION_TOOL_PINS: ${POSITION_TOOL_PINS:-}
  402. POSITION_TOOL_INCLUDES: ${POSITION_TOOL_INCLUDES:-}
  403. POSITION_TOOL_EXCLUDES: ${POSITION_TOOL_EXCLUDES:-}
  404. POSITION_PROVIDER_PINS: ${POSITION_PROVIDER_PINS:-}
  405. POSITION_PROVIDER_INCLUDES: ${POSITION_PROVIDER_INCLUDES:-}
  406. POSITION_PROVIDER_EXCLUDES: ${POSITION_PROVIDER_EXCLUDES:-}
  407. CSP_WHITELIST: ${CSP_WHITELIST:-}
  408. CREATE_TIDB_SERVICE_JOB_ENABLED: ${CREATE_TIDB_SERVICE_JOB_ENABLED:-false}
  409. MAX_SUBMIT_COUNT: ${MAX_SUBMIT_COUNT:-100}
  410. TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-10}
  411. DB_PLUGIN_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin}
  412. EXPOSE_PLUGIN_DAEMON_PORT: ${EXPOSE_PLUGIN_DAEMON_PORT:-5002}
  413. PLUGIN_DAEMON_PORT: ${PLUGIN_DAEMON_PORT:-5002}
  414. PLUGIN_DAEMON_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
  415. PLUGIN_DAEMON_URL: ${PLUGIN_DAEMON_URL:-http://plugin_daemon:5002}
  416. PLUGIN_MAX_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
  417. PLUGIN_PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
  418. PLUGIN_DEBUGGING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0}
  419. PLUGIN_DEBUGGING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003}
  420. EXPOSE_PLUGIN_DEBUGGING_HOST: ${EXPOSE_PLUGIN_DEBUGGING_HOST:-localhost}
  421. EXPOSE_PLUGIN_DEBUGGING_PORT: ${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}
  422. PLUGIN_DIFY_INNER_API_KEY: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
  423. PLUGIN_DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001}
  424. ENDPOINT_URL_TEMPLATE: ${ENDPOINT_URL_TEMPLATE:-http://localhost/e/{hook_id}}
  425. MARKETPLACE_ENABLED: ${MARKETPLACE_ENABLED:-true}
  426. MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
  427. FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
  428. PLUGIN_PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
  429. PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
  430. PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
  431. services:
  432. # API service
  433. api:
  434. image: langgenius/dify-api:1.1.3
  435. restart: always
  436. environment:
  437. # Use the shared environment variables.
  438. <<: *shared-api-worker-env
  439. # Startup mode, 'api' starts the API server.
  440. MODE: api
  441. SENTRY_DSN: ${API_SENTRY_DSN:-}
  442. SENTRY_TRACES_SAMPLE_RATE: ${API_SENTRY_TRACES_SAMPLE_RATE:-1.0}
  443. SENTRY_PROFILES_SAMPLE_RATE: ${API_SENTRY_PROFILES_SAMPLE_RATE:-1.0}
  444. PLUGIN_REMOTE_INSTALL_HOST: ${EXPOSE_PLUGIN_DEBUGGING_HOST:-localhost}
  445. PLUGIN_REMOTE_INSTALL_PORT: ${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}
  446. PLUGIN_MAX_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
  447. INNER_API_KEY_FOR_PLUGIN: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
  448. depends_on:
  449. - db
  450. - redis
  451. volumes:
  452. # Mount the storage directory to the container, for storing user files.
  453. - ./volumes/app/storage:/app/api/storage
  454. networks:
  455. - ssrf_proxy_network
  456. - default
  457. # worker service
  458. # The Celery worker for processing the queue.
  459. worker:
  460. image: langgenius/dify-api:1.1.3
  461. restart: always
  462. environment:
  463. # Use the shared environment variables.
  464. <<: *shared-api-worker-env
  465. # Startup mode, 'worker' starts the Celery worker for processing the queue.
  466. MODE: worker
  467. SENTRY_DSN: ${API_SENTRY_DSN:-}
  468. SENTRY_TRACES_SAMPLE_RATE: ${API_SENTRY_TRACES_SAMPLE_RATE:-1.0}
  469. SENTRY_PROFILES_SAMPLE_RATE: ${API_SENTRY_PROFILES_SAMPLE_RATE:-1.0}
  470. PLUGIN_MAX_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
  471. INNER_API_KEY_FOR_PLUGIN: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
  472. depends_on:
  473. - db
  474. - redis
  475. volumes:
  476. # Mount the storage directory to the container, for storing user files.
  477. - ./volumes/app/storage:/app/api/storage
  478. networks:
  479. - ssrf_proxy_network
  480. - default
  481. # Frontend web application.
  482. web:
  483. image: langgenius/dify-web:1.1.3
  484. restart: always
  485. environment:
  486. CONSOLE_API_URL: ${CONSOLE_API_URL:-}
  487. APP_API_URL: ${APP_API_URL:-}
  488. SENTRY_DSN: ${WEB_SENTRY_DSN:-}
  489. NEXT_TELEMETRY_DISABLED: ${NEXT_TELEMETRY_DISABLED:-0}
  490. TEXT_GENERATION_TIMEOUT_MS: ${TEXT_GENERATION_TIMEOUT_MS:-60000}
  491. CSP_WHITELIST: ${CSP_WHITELIST:-}
  492. MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
  493. MARKETPLACE_URL: ${MARKETPLACE_URL:-https://marketplace.dify.ai}
  494. TOP_K_MAX_VALUE: ${TOP_K_MAX_VALUE:-}
  495. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: ${INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH:-}
  496. PM2_INSTANCES: ${PM2_INSTANCES:-2}
  497. LOOP_NODE_MAX_COUNT: ${LOOP_NODE_MAX_COUNT:-100}
  498. MAX_TOOLS_NUM: ${MAX_TOOLS_NUM:-10}
  499. MAX_PARALLEL_LIMIT: ${MAX_PARALLEL_LIMIT:-10}
  500. # The postgres database.
  501. db:
  502. image: postgres:15-alpine
  503. restart: always
  504. environment:
  505. PGUSER: ${PGUSER:-postgres}
  506. POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-difyai123456}
  507. POSTGRES_DB: ${POSTGRES_DB:-dify}
  508. PGDATA: ${PGDATA:-/var/lib/postgresql/data/pgdata}
  509. command: >
  510. postgres -c 'max_connections=${POSTGRES_MAX_CONNECTIONS:-100}'
  511. -c 'shared_buffers=${POSTGRES_SHARED_BUFFERS:-128MB}'
  512. -c 'work_mem=${POSTGRES_WORK_MEM:-4MB}'
  513. -c 'maintenance_work_mem=${POSTGRES_MAINTENANCE_WORK_MEM:-64MB}'
  514. -c 'effective_cache_size=${POSTGRES_EFFECTIVE_CACHE_SIZE:-4096MB}'
  515. volumes:
  516. - ./volumes/db/data:/var/lib/postgresql/data
  517. healthcheck:
  518. test: [ 'CMD', 'pg_isready' ]
  519. interval: 1s
  520. timeout: 3s
  521. retries: 30
  522. # The redis cache.
  523. redis:
  524. image: redis:6-alpine
  525. restart: always
  526. environment:
  527. REDISCLI_AUTH: ${REDIS_PASSWORD:-difyai123456}
  528. volumes:
  529. # Mount the redis data directory to the container.
  530. - ./volumes/redis/data:/data
  531. # Set the redis password when startup redis server.
  532. command: redis-server --requirepass ${REDIS_PASSWORD:-difyai123456}
  533. healthcheck:
  534. test: [ 'CMD', 'redis-cli', 'ping' ]
  535. # The DifySandbox
  536. sandbox:
  537. image: langgenius/dify-sandbox:0.2.11
  538. restart: always
  539. environment:
  540. # The DifySandbox configurations
  541. # Make sure you are changing this key for your deployment with a strong key.
  542. # You can generate a strong key using `openssl rand -base64 42`.
  543. API_KEY: ${SANDBOX_API_KEY:-dify-sandbox}
  544. GIN_MODE: ${SANDBOX_GIN_MODE:-release}
  545. WORKER_TIMEOUT: ${SANDBOX_WORKER_TIMEOUT:-15}
  546. ENABLE_NETWORK: ${SANDBOX_ENABLE_NETWORK:-true}
  547. HTTP_PROXY: ${SANDBOX_HTTP_PROXY:-http://ssrf_proxy:3128}
  548. HTTPS_PROXY: ${SANDBOX_HTTPS_PROXY:-http://ssrf_proxy:3128}
  549. SANDBOX_PORT: ${SANDBOX_PORT:-8194}
  550. volumes:
  551. - ./volumes/sandbox/dependencies:/dependencies
  552. - ./volumes/sandbox/conf:/conf
  553. healthcheck:
  554. test: [ 'CMD', 'curl', '-f', 'http://localhost:8194/health' ]
  555. networks:
  556. - ssrf_proxy_network
  557. # plugin daemon
  558. plugin_daemon:
  559. image: langgenius/dify-plugin-daemon:0.0.6-local
  560. restart: always
  561. environment:
  562. # Use the shared environment variables.
  563. <<: *shared-api-worker-env
  564. DB_DATABASE: ${DB_PLUGIN_DATABASE:-dify_plugin}
  565. SERVER_PORT: ${PLUGIN_DAEMON_PORT:-5002}
  566. SERVER_KEY: ${PLUGIN_DAEMON_KEY:-lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi}
  567. MAX_PLUGIN_PACKAGE_SIZE: ${PLUGIN_MAX_PACKAGE_SIZE:-52428800}
  568. PPROF_ENABLED: ${PLUGIN_PPROF_ENABLED:-false}
  569. DIFY_INNER_API_URL: ${PLUGIN_DIFY_INNER_API_URL:-http://api:5001}
  570. DIFY_INNER_API_KEY: ${PLUGIN_DIFY_INNER_API_KEY:-QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1}
  571. PLUGIN_REMOTE_INSTALLING_HOST: ${PLUGIN_DEBUGGING_HOST:-0.0.0.0}
  572. PLUGIN_REMOTE_INSTALLING_PORT: ${PLUGIN_DEBUGGING_PORT:-5003}
  573. PLUGIN_WORKING_PATH: ${PLUGIN_WORKING_PATH:-/app/storage/cwd}
  574. FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
  575. PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
  576. PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
  577. PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
  578. ports:
  579. - "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
  580. volumes:
  581. - ./volumes/plugin_daemon:/app/storage
  582. depends_on:
  583. - db
  584. # ssrf_proxy server
  585. # for more information, please refer to
  586. # https://docs.dify.ai/learn-more/faq/install-faq#id-18.-why-is-ssrf_proxy-needed
  587. ssrf_proxy:
  588. image: ubuntu/squid:latest
  589. restart: always
  590. volumes:
  591. - ./ssrf_proxy/squid.conf.template:/etc/squid/squid.conf.template
  592. - ./ssrf_proxy/docker-entrypoint.sh:/docker-entrypoint-mount.sh
  593. entrypoint: [ 'sh', '-c', "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ]
  594. environment:
  595. # pls clearly modify the squid env vars to fit your network environment.
  596. HTTP_PORT: ${SSRF_HTTP_PORT:-3128}
  597. COREDUMP_DIR: ${SSRF_COREDUMP_DIR:-/var/spool/squid}
  598. REVERSE_PROXY_PORT: ${SSRF_REVERSE_PROXY_PORT:-8194}
  599. SANDBOX_HOST: ${SSRF_SANDBOX_HOST:-sandbox}
  600. SANDBOX_PORT: ${SANDBOX_PORT:-8194}
  601. networks:
  602. - ssrf_proxy_network
  603. - default
  604. # Certbot service
  605. # use `docker-compose --profile certbot up` to start the certbot service.
  606. certbot:
  607. image: certbot/certbot
  608. profiles:
  609. - certbot
  610. volumes:
  611. - ./volumes/certbot/conf:/etc/letsencrypt
  612. - ./volumes/certbot/www:/var/www/html
  613. - ./volumes/certbot/logs:/var/log/letsencrypt
  614. - ./volumes/certbot/conf/live:/etc/letsencrypt/live
  615. - ./certbot/update-cert.template.txt:/update-cert.template.txt
  616. - ./certbot/docker-entrypoint.sh:/docker-entrypoint.sh
  617. environment:
  618. - CERTBOT_EMAIL=${CERTBOT_EMAIL}
  619. - CERTBOT_DOMAIN=${CERTBOT_DOMAIN}
  620. - CERTBOT_OPTIONS=${CERTBOT_OPTIONS:-}
  621. entrypoint: [ '/docker-entrypoint.sh' ]
  622. command: [ 'tail', '-f', '/dev/null' ]
  623. # The nginx reverse proxy.
  624. # used for reverse proxying the API service and Web service.
  625. nginx:
  626. image: nginx:latest
  627. restart: always
  628. volumes:
  629. - ./nginx/nginx.conf.template:/etc/nginx/nginx.conf.template
  630. - ./nginx/proxy.conf.template:/etc/nginx/proxy.conf.template
  631. - ./nginx/https.conf.template:/etc/nginx/https.conf.template
  632. - ./nginx/conf.d:/etc/nginx/conf.d
  633. - ./nginx/docker-entrypoint.sh:/docker-entrypoint-mount.sh
  634. - ./nginx/ssl:/etc/ssl # cert dir (legacy)
  635. - ./volumes/certbot/conf/live:/etc/letsencrypt/live # cert dir (with certbot container)
  636. - ./volumes/certbot/conf:/etc/letsencrypt
  637. - ./volumes/certbot/www:/var/www/html
  638. entrypoint: [ 'sh', '-c', "cp /docker-entrypoint-mount.sh /docker-entrypoint.sh && sed -i 's/\r$$//' /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh && /docker-entrypoint.sh" ]
  639. environment:
  640. NGINX_SERVER_NAME: ${NGINX_SERVER_NAME:-_}
  641. NGINX_HTTPS_ENABLED: ${NGINX_HTTPS_ENABLED:-false}
  642. NGINX_SSL_PORT: ${NGINX_SSL_PORT:-443}
  643. NGINX_PORT: ${NGINX_PORT:-80}
  644. # You're required to add your own SSL certificates/keys to the `./nginx/ssl` directory
  645. # and modify the env vars below in .env if HTTPS_ENABLED is true.
  646. NGINX_SSL_CERT_FILENAME: ${NGINX_SSL_CERT_FILENAME:-dify.crt}
  647. NGINX_SSL_CERT_KEY_FILENAME: ${NGINX_SSL_CERT_KEY_FILENAME:-dify.key}
  648. NGINX_SSL_PROTOCOLS: ${NGINX_SSL_PROTOCOLS:-TLSv1.1 TLSv1.2 TLSv1.3}
  649. NGINX_WORKER_PROCESSES: ${NGINX_WORKER_PROCESSES:-auto}
  650. NGINX_CLIENT_MAX_BODY_SIZE: ${NGINX_CLIENT_MAX_BODY_SIZE:-15M}
  651. NGINX_KEEPALIVE_TIMEOUT: ${NGINX_KEEPALIVE_TIMEOUT:-65}
  652. NGINX_PROXY_READ_TIMEOUT: ${NGINX_PROXY_READ_TIMEOUT:-3600s}
  653. NGINX_PROXY_SEND_TIMEOUT: ${NGINX_PROXY_SEND_TIMEOUT:-3600s}
  654. NGINX_ENABLE_CERTBOT_CHALLENGE: ${NGINX_ENABLE_CERTBOT_CHALLENGE:-false}
  655. CERTBOT_DOMAIN: ${CERTBOT_DOMAIN:-}
  656. depends_on:
  657. - api
  658. - web
  659. ports:
  660. - '${EXPOSE_NGINX_PORT:-80}:${NGINX_PORT:-80}'
  661. - '${EXPOSE_NGINX_SSL_PORT:-443}:${NGINX_SSL_PORT:-443}'
  662. # The Weaviate vector store.
  663. weaviate:
  664. image: semitechnologies/weaviate:1.19.0
  665. profiles:
  666. - ''
  667. - weaviate
  668. restart: always
  669. volumes:
  670. # Mount the Weaviate data directory to the con tainer.
  671. - ./volumes/weaviate:/var/lib/weaviate
  672. environment:
  673. # The Weaviate configurations
  674. # You can refer to the [Weaviate](https://weaviate.io/developers/weaviate/config-refs/env-vars) documentation for more information.
  675. PERSISTENCE_DATA_PATH: ${WEAVIATE_PERSISTENCE_DATA_PATH:-/var/lib/weaviate}
  676. QUERY_DEFAULTS_LIMIT: ${WEAVIATE_QUERY_DEFAULTS_LIMIT:-25}
  677. AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ${WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED:-false}
  678. DEFAULT_VECTORIZER_MODULE: ${WEAVIATE_DEFAULT_VECTORIZER_MODULE:-none}
  679. CLUSTER_HOSTNAME: ${WEAVIATE_CLUSTER_HOSTNAME:-node1}
  680. AUTHENTICATION_APIKEY_ENABLED: ${WEAVIATE_AUTHENTICATION_APIKEY_ENABLED:-true}
  681. AUTHENTICATION_APIKEY_ALLOWED_KEYS: ${WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS:-WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih}
  682. AUTHENTICATION_APIKEY_USERS: ${WEAVIATE_AUTHENTICATION_APIKEY_USERS:-hello@dify.ai}
  683. AUTHORIZATION_ADMINLIST_ENABLED: ${WEAVIATE_AUTHORIZATION_ADMINLIST_ENABLED:-true}
  684. AUTHORIZATION_ADMINLIST_USERS: ${WEAVIATE_AUTHORIZATION_ADMINLIST_USERS:-hello@dify.ai}
  685. # Qdrant vector store.
  686. # (if used, you need to set VECTOR_STORE to qdrant in the api & worker service.)
  687. qdrant:
  688. image: langgenius/qdrant:v1.7.3
  689. profiles:
  690. - qdrant
  691. restart: always
  692. volumes:
  693. - ./volumes/qdrant:/qdrant/storage
  694. environment:
  695. QDRANT_API_KEY: ${QDRANT_API_KEY:-difyai123456}
  696. # The Couchbase vector store.
  697. couchbase-server:
  698. build: ./couchbase-server
  699. profiles:
  700. - couchbase
  701. restart: always
  702. environment:
  703. - CLUSTER_NAME=dify_search
  704. - COUCHBASE_ADMINISTRATOR_USERNAME=${COUCHBASE_USER:-Administrator}
  705. - COUCHBASE_ADMINISTRATOR_PASSWORD=${COUCHBASE_PASSWORD:-password}
  706. - COUCHBASE_BUCKET=${COUCHBASE_BUCKET_NAME:-Embeddings}
  707. - COUCHBASE_BUCKET_RAMSIZE=512
  708. - COUCHBASE_RAM_SIZE=2048
  709. - COUCHBASE_EVENTING_RAM_SIZE=512
  710. - COUCHBASE_INDEX_RAM_SIZE=512
  711. - COUCHBASE_FTS_RAM_SIZE=1024
  712. hostname: couchbase-server
  713. container_name: couchbase-server
  714. working_dir: /opt/couchbase
  715. stdin_open: true
  716. tty: true
  717. entrypoint: [ "" ]
  718. command: sh -c "/opt/couchbase/init/init-cbserver.sh"
  719. volumes:
  720. - ./volumes/couchbase/data:/opt/couchbase/var/lib/couchbase/data
  721. healthcheck:
  722. # ensure bucket was created before proceeding
  723. test: [ "CMD-SHELL", "curl -s -f -u Administrator:password http://localhost:8091/pools/default/buckets | grep -q '\\[{' || exit 1" ]
  724. interval: 10s
  725. retries: 10
  726. start_period: 30s
  727. timeout: 10s
  728. # The pgvector vector database.
  729. pgvector:
  730. image: pgvector/pgvector:pg16
  731. profiles:
  732. - pgvector
  733. restart: always
  734. environment:
  735. PGUSER: ${PGVECTOR_PGUSER:-postgres}
  736. # The password for the default postgres user.
  737. POSTGRES_PASSWORD: ${PGVECTOR_POSTGRES_PASSWORD:-difyai123456}
  738. # The name of the default postgres database.
  739. POSTGRES_DB: ${PGVECTOR_POSTGRES_DB:-dify}
  740. # postgres data directory
  741. PGDATA: ${PGVECTOR_PGDATA:-/var/lib/postgresql/data/pgdata}
  742. # pg_bigm module for full text search
  743. PG_BIGM: ${PGVECTOR_PG_BIGM:-false}
  744. PG_BIGM_VERSION: ${PGVECTOR_PG_BIGM_VERSION:-1.2-20240606}
  745. volumes:
  746. - ./volumes/pgvector/data:/var/lib/postgresql/data
  747. - ./pgvector/docker-entrypoint.sh:/docker-entrypoint.sh
  748. entrypoint: [ '/docker-entrypoint.sh' ]
  749. healthcheck:
  750. test: [ 'CMD', 'pg_isready' ]
  751. interval: 1s
  752. timeout: 3s
  753. retries: 30
  754. # pgvecto-rs vector store
  755. pgvecto-rs:
  756. image: tensorchord/pgvecto-rs:pg16-v0.3.0
  757. profiles:
  758. - pgvecto-rs
  759. restart: always
  760. environment:
  761. PGUSER: ${PGVECTOR_PGUSER:-postgres}
  762. # The password for the default postgres user.
  763. POSTGRES_PASSWORD: ${PGVECTOR_POSTGRES_PASSWORD:-difyai123456}
  764. # The name of the default postgres database.
  765. POSTGRES_DB: ${PGVECTOR_POSTGRES_DB:-dify}
  766. # postgres data directory
  767. PGDATA: ${PGVECTOR_PGDATA:-/var/lib/postgresql/data/pgdata}
  768. volumes:
  769. - ./volumes/pgvecto_rs/data:/var/lib/postgresql/data
  770. healthcheck:
  771. test: [ 'CMD', 'pg_isready' ]
  772. interval: 1s
  773. timeout: 3s
  774. retries: 30
  775. # Chroma vector database
  776. chroma:
  777. image: ghcr.io/chroma-core/chroma:0.5.20
  778. profiles:
  779. - chroma
  780. restart: always
  781. volumes:
  782. - ./volumes/chroma:/chroma/chroma
  783. environment:
  784. CHROMA_SERVER_AUTHN_CREDENTIALS: ${CHROMA_SERVER_AUTHN_CREDENTIALS:-difyai123456}
  785. CHROMA_SERVER_AUTHN_PROVIDER: ${CHROMA_SERVER_AUTHN_PROVIDER:-chromadb.auth.token_authn.TokenAuthenticationServerProvider}
  786. IS_PERSISTENT: ${CHROMA_IS_PERSISTENT:-TRUE}
  787. # OceanBase vector database
  788. oceanbase:
  789. image: quay.io/oceanbase/oceanbase-ce:4.3.3.0-100000142024101215
  790. profiles:
  791. - oceanbase
  792. restart: always
  793. volumes:
  794. - ./volumes/oceanbase/data:/root/ob
  795. - ./volumes/oceanbase/conf:/root/.obd/cluster
  796. - ./volumes/oceanbase/init.d:/root/boot/init.d
  797. environment:
  798. OB_MEMORY_LIMIT: ${OCEANBASE_MEMORY_LIMIT:-6G}
  799. OB_SYS_PASSWORD: ${OCEANBASE_VECTOR_PASSWORD:-difyai123456}
  800. OB_TENANT_PASSWORD: ${OCEANBASE_VECTOR_PASSWORD:-difyai123456}
  801. OB_CLUSTER_NAME: ${OCEANBASE_CLUSTER_NAME:-difyai}
  802. OB_SERVER_IP: '127.0.0.1'
  803. # Oracle vector database
  804. oracle:
  805. image: container-registry.oracle.com/database/free:latest
  806. profiles:
  807. - oracle
  808. restart: always
  809. volumes:
  810. - source: oradata
  811. type: volume
  812. target: /opt/oracle/oradata
  813. - ./startupscripts:/opt/oracle/scripts/startup
  814. environment:
  815. ORACLE_PWD: ${ORACLE_PWD:-Dify123456}
  816. ORACLE_CHARACTERSET: ${ORACLE_CHARACTERSET:-AL32UTF8}
  817. # Milvus vector database services
  818. etcd:
  819. container_name: milvus-etcd
  820. image: quay.io/coreos/etcd:v3.5.5
  821. profiles:
  822. - milvus
  823. environment:
  824. ETCD_AUTO_COMPACTION_MODE: ${ETCD_AUTO_COMPACTION_MODE:-revision}
  825. ETCD_AUTO_COMPACTION_RETENTION: ${ETCD_AUTO_COMPACTION_RETENTION:-1000}
  826. ETCD_QUOTA_BACKEND_BYTES: ${ETCD_QUOTA_BACKEND_BYTES:-4294967296}
  827. ETCD_SNAPSHOT_COUNT: ${ETCD_SNAPSHOT_COUNT:-50000}
  828. volumes:
  829. - ./volumes/milvus/etcd:/etcd
  830. command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
  831. healthcheck:
  832. test: [ 'CMD', 'etcdctl', 'endpoint', 'health' ]
  833. interval: 30s
  834. timeout: 20s
  835. retries: 3
  836. networks:
  837. - milvus
  838. minio:
  839. container_name: milvus-minio
  840. image: minio/minio:RELEASE.2023-03-20T20-16-18Z
  841. profiles:
  842. - milvus
  843. environment:
  844. MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
  845. MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
  846. volumes:
  847. - ./volumes/milvus/minio:/minio_data
  848. command: minio server /minio_data --console-address ":9001"
  849. healthcheck:
  850. test: [ 'CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live' ]
  851. interval: 30s
  852. timeout: 20s
  853. retries: 3
  854. networks:
  855. - milvus
  856. milvus-standalone:
  857. container_name: milvus-standalone
  858. image: milvusdb/milvus:v2.5.0-beta
  859. profiles:
  860. - milvus
  861. command: [ 'milvus', 'run', 'standalone' ]
  862. environment:
  863. ETCD_ENDPOINTS: ${ETCD_ENDPOINTS:-etcd:2379}
  864. MINIO_ADDRESS: ${MINIO_ADDRESS:-minio:9000}
  865. common.security.authorizationEnabled: ${MILVUS_AUTHORIZATION_ENABLED:-true}
  866. volumes:
  867. - ./volumes/milvus/milvus:/var/lib/milvus
  868. healthcheck:
  869. test: [ 'CMD', 'curl', '-f', 'http://localhost:9091/healthz' ]
  870. interval: 30s
  871. start_period: 90s
  872. timeout: 20s
  873. retries: 3
  874. depends_on:
  875. - etcd
  876. - minio
  877. ports:
  878. - 19530:19530
  879. - 9091:9091
  880. networks:
  881. - milvus
  882. # Opensearch vector database
  883. opensearch:
  884. container_name: opensearch
  885. image: opensearchproject/opensearch:latest
  886. profiles:
  887. - opensearch
  888. environment:
  889. discovery.type: ${OPENSEARCH_DISCOVERY_TYPE:-single-node}
  890. bootstrap.memory_lock: ${OPENSEARCH_BOOTSTRAP_MEMORY_LOCK:-true}
  891. OPENSEARCH_JAVA_OPTS: -Xms${OPENSEARCH_JAVA_OPTS_MIN:-512m} -Xmx${OPENSEARCH_JAVA_OPTS_MAX:-1024m}
  892. OPENSEARCH_INITIAL_ADMIN_PASSWORD: ${OPENSEARCH_INITIAL_ADMIN_PASSWORD:-Qazwsxedc!@#123}
  893. ulimits:
  894. memlock:
  895. soft: ${OPENSEARCH_MEMLOCK_SOFT:--1}
  896. hard: ${OPENSEARCH_MEMLOCK_HARD:--1}
  897. nofile:
  898. soft: ${OPENSEARCH_NOFILE_SOFT:-65536}
  899. hard: ${OPENSEARCH_NOFILE_HARD:-65536}
  900. volumes:
  901. - ./volumes/opensearch/data:/usr/share/opensearch/data
  902. networks:
  903. - opensearch-net
  904. opensearch-dashboards:
  905. container_name: opensearch-dashboards
  906. image: opensearchproject/opensearch-dashboards:latest
  907. profiles:
  908. - opensearch
  909. environment:
  910. OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
  911. volumes:
  912. - ./volumes/opensearch/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
  913. networks:
  914. - opensearch-net
  915. depends_on:
  916. - opensearch
  917. # opengauss vector database.
  918. opengauss:
  919. image: opengauss/opengauss:7.0.0-RC1
  920. profiles:
  921. - opengauss
  922. privileged: true
  923. restart: always
  924. environment:
  925. GS_USERNAME: ${OPENGAUSS_USER:-postgres}
  926. GS_PASSWORD: ${OPENGAUSS_PASSWORD:-Dify@123}
  927. GS_PORT: ${OPENGAUSS_PORT:-6600}
  928. GS_DB: ${OPENGAUSS_DATABASE:-dify}
  929. volumes:
  930. - ./volumes/opengauss/data:/var/lib/opengauss/data
  931. healthcheck:
  932. test: ["CMD-SHELL", "netstat -lntp | grep tcp6 > /dev/null 2>&1"]
  933. interval: 10s
  934. timeout: 10s
  935. retries: 10
  936. ports:
  937. - ${OPENGAUSS_PORT:-6600}:${OPENGAUSS_PORT:-6600}
  938. # MyScale vector database
  939. myscale:
  940. container_name: myscale
  941. image: myscale/myscaledb:1.6.4
  942. profiles:
  943. - myscale
  944. restart: always
  945. tty: true
  946. volumes:
  947. - ./volumes/myscale/data:/var/lib/clickhouse
  948. - ./volumes/myscale/log:/var/log/clickhouse-server
  949. - ./volumes/myscale/config/users.d/custom_users_config.xml:/etc/clickhouse-server/users.d/custom_users_config.xml
  950. ports:
  951. - ${MYSCALE_PORT:-8123}:${MYSCALE_PORT:-8123}
  952. # https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html
  953. # https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-prod-prerequisites
  954. elasticsearch:
  955. image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
  956. container_name: elasticsearch
  957. profiles:
  958. - elasticsearch
  959. - elasticsearch-ja
  960. restart: always
  961. volumes:
  962. - ./elasticsearch/docker-entrypoint.sh:/docker-entrypoint-mount.sh
  963. - dify_es01_data:/usr/share/elasticsearch/data
  964. environment:
  965. ELASTIC_PASSWORD: ${ELASTICSEARCH_PASSWORD:-elastic}
  966. VECTOR_STORE: ${VECTOR_STORE:-}
  967. cluster.name: dify-es-cluster
  968. node.name: dify-es0
  969. discovery.type: single-node
  970. xpack.license.self_generated.type: basic
  971. xpack.security.enabled: 'true'
  972. xpack.security.enrollment.enabled: 'false'
  973. xpack.security.http.ssl.enabled: 'false'
  974. ports:
  975. - ${ELASTICSEARCH_PORT:-9200}:9200
  976. deploy:
  977. resources:
  978. limits:
  979. memory: 2g
  980. entrypoint: [ 'sh', '-c', "sh /docker-entrypoint-mount.sh" ]
  981. healthcheck:
  982. test: [ 'CMD', 'curl', '-s', 'http://localhost:9200/_cluster/health?pretty' ]
  983. interval: 30s
  984. timeout: 10s
  985. retries: 50
  986. # https://www.elastic.co/guide/en/kibana/current/docker.html
  987. # https://www.elastic.co/guide/en/kibana/current/settings.html
  988. kibana:
  989. image: docker.elastic.co/kibana/kibana:8.14.3
  990. container_name: kibana
  991. profiles:
  992. - elasticsearch
  993. depends_on:
  994. - elasticsearch
  995. restart: always
  996. environment:
  997. XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: d1a66dfd-c4d3-4a0a-8290-2abcb83ab3aa
  998. NO_PROXY: localhost,127.0.0.1,elasticsearch,kibana
  999. XPACK_SECURITY_ENABLED: 'true'
  1000. XPACK_SECURITY_ENROLLMENT_ENABLED: 'false'
  1001. XPACK_SECURITY_HTTP_SSL_ENABLED: 'false'
  1002. XPACK_FLEET_ISAIRGAPPED: 'true'
  1003. I18N_LOCALE: zh-CN
  1004. SERVER_PORT: '5601'
  1005. ELASTICSEARCH_HOSTS: http://elasticsearch:9200
  1006. ports:
  1007. - ${KIBANA_PORT:-5601}:5601
  1008. healthcheck:
  1009. test: [ 'CMD-SHELL', 'curl -s http://localhost:5601 >/dev/null || exit 1' ]
  1010. interval: 30s
  1011. timeout: 10s
  1012. retries: 3
  1013. # unstructured .
  1014. # (if used, you need to set ETL_TYPE to Unstructured in the api & worker service.)
  1015. unstructured:
  1016. image: downloads.unstructured.io/unstructured-io/unstructured-api:latest
  1017. profiles:
  1018. - unstructured
  1019. restart: always
  1020. volumes:
  1021. - ./volumes/unstructured:/app/data
  1022. networks:
  1023. # create a network between sandbox, api and ssrf_proxy, and can not access outside.
  1024. ssrf_proxy_network:
  1025. driver: bridge
  1026. internal: true
  1027. milvus:
  1028. driver: bridge
  1029. opensearch-net:
  1030. driver: bridge
  1031. internal: true
  1032. volumes:
  1033. oradata:
  1034. dify_es01_data: