From c7711122a25c45a8c0c73764378cb7a998c92bf3 Mon Sep 17 00:00:00 2001 From: ms Date: Fri, 28 Feb 2025 23:23:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=20Dify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../volumes/oceanbase/init.d/vec_memory.sql | 2 -- .../{0.15.3 => 1.0.0}/conf/certbot/README.md | 0 .../conf/certbot/docker-entrypoint.sh | 0 .../conf/certbot/update-cert.template.txt | 0 .../conf/couchbase-server/Dockerfile | 0 .../conf/couchbase-server/init-cbserver.sh | 0 .../conf/elasticsearch/docker-entrypoint.sh | 0 .../conf/nginx/conf.d/default.conf.template | 11 +++++++ .../conf/nginx/docker-entrypoint.sh | 0 .../conf/nginx/https.conf.template | 0 .../conf/nginx/nginx.conf.template | 0 .../conf/nginx/proxy.conf.template | 0 .../{0.15.3 => 1.0.0}/conf/nginx/ssl/.gitkeep | 0 .../conf/ssrf_proxy/docker-entrypoint.sh | 0 .../conf/ssrf_proxy/squid.conf.template | 0 .../conf/startupscripts/init.sh | 0 .../conf/startupscripts/init_user.script | 0 .../conf/tidb/config/pd.toml | 0 .../conf/tidb/config/tiflash-learner.toml | 0 .../conf/tidb/config/tiflash.toml | 0 .../conf/tidb/docker-compose.yaml | 0 .../config/users.d/custom_users_config.xml | 0 .../volumes/oceanbase/init.d/vec_memory.sql | 1 + .../opensearch/opensearch_dashboards.yml | 8 ++--- .../conf/volumes/sandbox/conf/config.yaml | 0 .../volumes/sandbox/conf/config.yaml.example | 0 .../dependencies/python-requirements.txt | 0 apps/dify/{0.15.3 => 1.0.0}/data.yml | 0 .../dify/{0.15.3 => 1.0.0}/docker-compose.yml | 9 +++--- apps/dify/{0.15.3 => 1.0.0}/envs/default.env | 0 apps/dify/{0.15.3 => 1.0.0}/envs/dify.env | 31 +++++++++++++++++-- apps/dify/{0.15.3 => 1.0.0}/envs/global.env | 0 apps/dify/{0.15.3 => 1.0.0}/scripts/init.sh | 0 .../{0.15.3 => 1.0.0}/scripts/uninstall.sh | 0 .../dify/{0.15.3 => 1.0.0}/scripts/upgrade.sh | 0 35 files changed, 50 insertions(+), 12 deletions(-) delete mode 100644 apps/dify/0.15.3/conf/volumes/oceanbase/init.d/vec_memory.sql rename apps/dify/{0.15.3 => 1.0.0}/conf/certbot/README.md (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/certbot/docker-entrypoint.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/certbot/update-cert.template.txt (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/couchbase-server/Dockerfile (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/couchbase-server/init-cbserver.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/elasticsearch/docker-entrypoint.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/conf.d/default.conf.template (75%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/docker-entrypoint.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/https.conf.template (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/nginx.conf.template (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/proxy.conf.template (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/nginx/ssl/.gitkeep (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/ssrf_proxy/docker-entrypoint.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/ssrf_proxy/squid.conf.template (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/startupscripts/init.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/startupscripts/init_user.script (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/tidb/config/pd.toml (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/tidb/config/tiflash-learner.toml (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/tidb/config/tiflash.toml (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/tidb/docker-compose.yaml (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/volumes/myscale/config/users.d/custom_users_config.xml (100%) create mode 100644 apps/dify/1.0.0/conf/volumes/oceanbase/init.d/vec_memory.sql rename apps/dify/{0.15.3 => 1.0.0}/conf/volumes/opensearch/opensearch_dashboards.yml (97%) rename apps/dify/{0.15.3 => 1.0.0}/conf/volumes/sandbox/conf/config.yaml (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/volumes/sandbox/conf/config.yaml.example (100%) rename apps/dify/{0.15.3 => 1.0.0}/conf/volumes/sandbox/dependencies/python-requirements.txt (100%) rename apps/dify/{0.15.3 => 1.0.0}/data.yml (100%) rename apps/dify/{0.15.3 => 1.0.0}/docker-compose.yml (99%) rename apps/dify/{0.15.3 => 1.0.0}/envs/default.env (100%) rename apps/dify/{0.15.3 => 1.0.0}/envs/dify.env (97%) rename apps/dify/{0.15.3 => 1.0.0}/envs/global.env (100%) rename apps/dify/{0.15.3 => 1.0.0}/scripts/init.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/scripts/uninstall.sh (100%) rename apps/dify/{0.15.3 => 1.0.0}/scripts/upgrade.sh (100%) diff --git a/apps/dify/0.15.3/conf/volumes/oceanbase/init.d/vec_memory.sql b/apps/dify/0.15.3/conf/volumes/oceanbase/init.d/vec_memory.sql deleted file mode 100644 index 3dd2fdd5..00000000 --- a/apps/dify/0.15.3/conf/volumes/oceanbase/init.d/vec_memory.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER -SYSTEM SET ob_vector_memory_limit_percentage = 30; diff --git a/apps/dify/0.15.3/conf/certbot/README.md b/apps/dify/1.0.0/conf/certbot/README.md similarity index 100% rename from apps/dify/0.15.3/conf/certbot/README.md rename to apps/dify/1.0.0/conf/certbot/README.md diff --git a/apps/dify/0.15.3/conf/certbot/docker-entrypoint.sh b/apps/dify/1.0.0/conf/certbot/docker-entrypoint.sh similarity index 100% rename from apps/dify/0.15.3/conf/certbot/docker-entrypoint.sh rename to apps/dify/1.0.0/conf/certbot/docker-entrypoint.sh diff --git a/apps/dify/0.15.3/conf/certbot/update-cert.template.txt b/apps/dify/1.0.0/conf/certbot/update-cert.template.txt similarity index 100% rename from apps/dify/0.15.3/conf/certbot/update-cert.template.txt rename to apps/dify/1.0.0/conf/certbot/update-cert.template.txt diff --git a/apps/dify/0.15.3/conf/couchbase-server/Dockerfile b/apps/dify/1.0.0/conf/couchbase-server/Dockerfile similarity index 100% rename from apps/dify/0.15.3/conf/couchbase-server/Dockerfile rename to apps/dify/1.0.0/conf/couchbase-server/Dockerfile diff --git a/apps/dify/0.15.3/conf/couchbase-server/init-cbserver.sh b/apps/dify/1.0.0/conf/couchbase-server/init-cbserver.sh similarity index 100% rename from apps/dify/0.15.3/conf/couchbase-server/init-cbserver.sh rename to apps/dify/1.0.0/conf/couchbase-server/init-cbserver.sh diff --git a/apps/dify/0.15.3/conf/elasticsearch/docker-entrypoint.sh b/apps/dify/1.0.0/conf/elasticsearch/docker-entrypoint.sh similarity index 100% rename from apps/dify/0.15.3/conf/elasticsearch/docker-entrypoint.sh rename to apps/dify/1.0.0/conf/elasticsearch/docker-entrypoint.sh diff --git a/apps/dify/0.15.3/conf/nginx/conf.d/default.conf.template b/apps/dify/1.0.0/conf/nginx/conf.d/default.conf.template similarity index 75% rename from apps/dify/0.15.3/conf/nginx/conf.d/default.conf.template rename to apps/dify/1.0.0/conf/nginx/conf.d/default.conf.template index 9691122c..a458412d 100644 --- a/apps/dify/0.15.3/conf/nginx/conf.d/default.conf.template +++ b/apps/dify/1.0.0/conf/nginx/conf.d/default.conf.template @@ -24,6 +24,17 @@ server { include proxy.conf; } + location /explore { + proxy_pass http://web:3000; + include proxy.conf; + } + + location /e/ { + proxy_pass http://plugin_daemon:5002; + proxy_set_header Dify-Hook-Url $scheme://$host$request_uri; + include proxy.conf; + } + location / { proxy_pass http://web:3000; include proxy.conf; diff --git a/apps/dify/0.15.3/conf/nginx/docker-entrypoint.sh b/apps/dify/1.0.0/conf/nginx/docker-entrypoint.sh similarity index 100% rename from apps/dify/0.15.3/conf/nginx/docker-entrypoint.sh rename to apps/dify/1.0.0/conf/nginx/docker-entrypoint.sh diff --git a/apps/dify/0.15.3/conf/nginx/https.conf.template b/apps/dify/1.0.0/conf/nginx/https.conf.template similarity index 100% rename from apps/dify/0.15.3/conf/nginx/https.conf.template rename to apps/dify/1.0.0/conf/nginx/https.conf.template diff --git a/apps/dify/0.15.3/conf/nginx/nginx.conf.template b/apps/dify/1.0.0/conf/nginx/nginx.conf.template similarity index 100% rename from apps/dify/0.15.3/conf/nginx/nginx.conf.template rename to apps/dify/1.0.0/conf/nginx/nginx.conf.template diff --git a/apps/dify/0.15.3/conf/nginx/proxy.conf.template b/apps/dify/1.0.0/conf/nginx/proxy.conf.template similarity index 100% rename from apps/dify/0.15.3/conf/nginx/proxy.conf.template rename to apps/dify/1.0.0/conf/nginx/proxy.conf.template diff --git a/apps/dify/0.15.3/conf/nginx/ssl/.gitkeep b/apps/dify/1.0.0/conf/nginx/ssl/.gitkeep similarity index 100% rename from apps/dify/0.15.3/conf/nginx/ssl/.gitkeep rename to apps/dify/1.0.0/conf/nginx/ssl/.gitkeep diff --git a/apps/dify/0.15.3/conf/ssrf_proxy/docker-entrypoint.sh b/apps/dify/1.0.0/conf/ssrf_proxy/docker-entrypoint.sh similarity index 100% rename from apps/dify/0.15.3/conf/ssrf_proxy/docker-entrypoint.sh rename to apps/dify/1.0.0/conf/ssrf_proxy/docker-entrypoint.sh diff --git a/apps/dify/0.15.3/conf/ssrf_proxy/squid.conf.template b/apps/dify/1.0.0/conf/ssrf_proxy/squid.conf.template similarity index 100% rename from apps/dify/0.15.3/conf/ssrf_proxy/squid.conf.template rename to apps/dify/1.0.0/conf/ssrf_proxy/squid.conf.template diff --git a/apps/dify/0.15.3/conf/startupscripts/init.sh b/apps/dify/1.0.0/conf/startupscripts/init.sh similarity index 100% rename from apps/dify/0.15.3/conf/startupscripts/init.sh rename to apps/dify/1.0.0/conf/startupscripts/init.sh diff --git a/apps/dify/0.15.3/conf/startupscripts/init_user.script b/apps/dify/1.0.0/conf/startupscripts/init_user.script similarity index 100% rename from apps/dify/0.15.3/conf/startupscripts/init_user.script rename to apps/dify/1.0.0/conf/startupscripts/init_user.script diff --git a/apps/dify/0.15.3/conf/tidb/config/pd.toml b/apps/dify/1.0.0/conf/tidb/config/pd.toml similarity index 100% rename from apps/dify/0.15.3/conf/tidb/config/pd.toml rename to apps/dify/1.0.0/conf/tidb/config/pd.toml diff --git a/apps/dify/0.15.3/conf/tidb/config/tiflash-learner.toml b/apps/dify/1.0.0/conf/tidb/config/tiflash-learner.toml similarity index 100% rename from apps/dify/0.15.3/conf/tidb/config/tiflash-learner.toml rename to apps/dify/1.0.0/conf/tidb/config/tiflash-learner.toml diff --git a/apps/dify/0.15.3/conf/tidb/config/tiflash.toml b/apps/dify/1.0.0/conf/tidb/config/tiflash.toml similarity index 100% rename from apps/dify/0.15.3/conf/tidb/config/tiflash.toml rename to apps/dify/1.0.0/conf/tidb/config/tiflash.toml diff --git a/apps/dify/0.15.3/conf/tidb/docker-compose.yaml b/apps/dify/1.0.0/conf/tidb/docker-compose.yaml similarity index 100% rename from apps/dify/0.15.3/conf/tidb/docker-compose.yaml rename to apps/dify/1.0.0/conf/tidb/docker-compose.yaml diff --git a/apps/dify/0.15.3/conf/volumes/myscale/config/users.d/custom_users_config.xml b/apps/dify/1.0.0/conf/volumes/myscale/config/users.d/custom_users_config.xml similarity index 100% rename from apps/dify/0.15.3/conf/volumes/myscale/config/users.d/custom_users_config.xml rename to apps/dify/1.0.0/conf/volumes/myscale/config/users.d/custom_users_config.xml diff --git a/apps/dify/1.0.0/conf/volumes/oceanbase/init.d/vec_memory.sql b/apps/dify/1.0.0/conf/volumes/oceanbase/init.d/vec_memory.sql new file mode 100644 index 00000000..f4c283fd --- /dev/null +++ b/apps/dify/1.0.0/conf/volumes/oceanbase/init.d/vec_memory.sql @@ -0,0 +1 @@ +ALTER SYSTEM SET ob_vector_memory_limit_percentage = 30; \ No newline at end of file diff --git a/apps/dify/0.15.3/conf/volumes/opensearch/opensearch_dashboards.yml b/apps/dify/1.0.0/conf/volumes/opensearch/opensearch_dashboards.yml similarity index 97% rename from apps/dify/0.15.3/conf/volumes/opensearch/opensearch_dashboards.yml rename to apps/dify/1.0.0/conf/volumes/opensearch/opensearch_dashboards.yml index bd49444b..f50d63bb 100644 --- a/apps/dify/0.15.3/conf/volumes/opensearch/opensearch_dashboards.yml +++ b/apps/dify/1.0.0/conf/volumes/opensearch/opensearch_dashboards.yml @@ -208,15 +208,15 @@ # Set the value of this setting to true to enable UI Metric collections # usageCollection.uiMetric.enabled: false -opensearch.hosts: [ https://localhost:9200 ] +opensearch.hosts: [https://localhost:9200] opensearch.ssl.verificationMode: none opensearch.username: admin opensearch.password: 'Qazwsxedc!@#123' -opensearch.requestHeadersWhitelist: [ authorization, securitytenant ] +opensearch.requestHeadersWhitelist: [authorization, securitytenant] opensearch_security.multitenancy.enabled: true -opensearch_security.multitenancy.tenants.preferred: [ Private, Global ] -opensearch_security.readonly_mode.roles: [ kibana_read_only ] +opensearch_security.multitenancy.tenants.preferred: [Private, Global] +opensearch_security.readonly_mode.roles: [kibana_read_only] # Use this setting if you are running opensearch-dashboards without https opensearch_security.cookie.secure: false server.host: '0.0.0.0' diff --git a/apps/dify/0.15.3/conf/volumes/sandbox/conf/config.yaml b/apps/dify/1.0.0/conf/volumes/sandbox/conf/config.yaml similarity index 100% rename from apps/dify/0.15.3/conf/volumes/sandbox/conf/config.yaml rename to apps/dify/1.0.0/conf/volumes/sandbox/conf/config.yaml diff --git a/apps/dify/0.15.3/conf/volumes/sandbox/conf/config.yaml.example b/apps/dify/1.0.0/conf/volumes/sandbox/conf/config.yaml.example similarity index 100% rename from apps/dify/0.15.3/conf/volumes/sandbox/conf/config.yaml.example rename to apps/dify/1.0.0/conf/volumes/sandbox/conf/config.yaml.example diff --git a/apps/dify/0.15.3/conf/volumes/sandbox/dependencies/python-requirements.txt b/apps/dify/1.0.0/conf/volumes/sandbox/dependencies/python-requirements.txt similarity index 100% rename from apps/dify/0.15.3/conf/volumes/sandbox/dependencies/python-requirements.txt rename to apps/dify/1.0.0/conf/volumes/sandbox/dependencies/python-requirements.txt diff --git a/apps/dify/0.15.3/data.yml b/apps/dify/1.0.0/data.yml similarity index 100% rename from apps/dify/0.15.3/data.yml rename to apps/dify/1.0.0/data.yml diff --git a/apps/dify/0.15.3/docker-compose.yml b/apps/dify/1.0.0/docker-compose.yml similarity index 99% rename from apps/dify/0.15.3/docker-compose.yml rename to apps/dify/1.0.0/docker-compose.yml index 3b41c66c..175a5181 100644 --- a/apps/dify/0.15.3/docker-compose.yml +++ b/apps/dify/1.0.0/docker-compose.yml @@ -413,7 +413,7 @@ x-shared-env: &shared-api-worker-env services: api: - image: langgenius/dify-api:0.15.3 + image: langgenius/dify-api:1.0.0 container_name: api-${CONTAINER_NAME} restart: always environment: @@ -434,7 +434,7 @@ services: - default worker: - image: langgenius/dify-api:0.15.3 + image: langgenius/dify-api:1.0.0 container_name: worker-${CONTAINER_NAME} restart: always environment: @@ -455,7 +455,7 @@ services: - default web: - image: langgenius/dify-web:0.15.3 + image: langgenius/dify-web:1.0.0 container_name: ${CONTAINER_NAME} restart: always environment: @@ -521,13 +521,14 @@ services: SANDBOX_PORT: ${SANDBOX_PORT:-8194} volumes: - ${DIFY_ROOT_PATH}/volumes/sandbox/dependencies:/dependencies + - ${DIFY_ROOT_PATH}/volumes/sandbox/conf:/conf healthcheck: test: [ 'CMD', 'curl', '-f', 'http://localhost:8194/health' ] networks: - ssrf_proxy_network plugin_daemon: - image: langgenius/dify-plugin-daemon:0.0.2-local + image: langgenius/dify-plugin-daemon:0.0.3-local container_name: plugin_daemon-${CONTAINER_NAME} restart: always environment: diff --git a/apps/dify/0.15.3/envs/default.env b/apps/dify/1.0.0/envs/default.env similarity index 100% rename from apps/dify/0.15.3/envs/default.env rename to apps/dify/1.0.0/envs/default.env diff --git a/apps/dify/0.15.3/envs/dify.env b/apps/dify/1.0.0/envs/dify.env similarity index 97% rename from apps/dify/0.15.3/envs/dify.env rename to apps/dify/1.0.0/envs/dify.env index ddb615b3..9f6732ed 100644 --- a/apps/dify/0.15.3/envs/dify.env +++ b/apps/dify/1.0.0/envs/dify.env @@ -903,8 +903,8 @@ COMPOSE_PROFILES=${VECTOR_STORE:-weaviate} # ------------------------------ # Docker Compose Service Expose Host Port Configurations # ------------------------------ -PANEL_APP_PORT_HTTP=80 -PANEL_APP_PORT_HTTPS=443 +EXPOSE_NGINX_PORT=80 +EXPOSE_NGINX_SSL_PORT=443 # ---------------------------------------------------------------------------- # ModelProvider & Tool Position Configuration @@ -936,3 +936,30 @@ MAX_SUBMIT_COUNT=100 # The maximum number of top-k value for RAG. TOP_K_MAX_VALUE=10 + +# ------------------------------ +# Plugin Daemon Configuration +# ------------------------------ + +DB_PLUGIN_DATABASE=dify_plugin +EXPOSE_PLUGIN_DAEMON_PORT=5002 +PLUGIN_DAEMON_PORT=5002 +PLUGIN_DAEMON_KEY=lYkiYYT6owG+71oLerGzA7GXCgOT++6ovaezWAjpCjf+Sjc3ZtU+qUEi +PLUGIN_DAEMON_URL=http://plugin_daemon:5002 +PLUGIN_MAX_PACKAGE_SIZE=52428800 +PLUGIN_PPROF_ENABLED=false + +PLUGIN_DEBUGGING_HOST=0.0.0.0 +PLUGIN_DEBUGGING_PORT=5003 +EXPOSE_PLUGIN_DEBUGGING_HOST=localhost +EXPOSE_PLUGIN_DEBUGGING_PORT=5003 + +PLUGIN_DIFY_INNER_API_KEY=QaHbTe77CtuXmsfyhR7+vRjI/+XbV1AaFy691iy+kGDv2Jvy0/eAh8Y1 +PLUGIN_DIFY_INNER_API_URL=http://api:5001 + +ENDPOINT_URL_TEMPLATE=http://localhost/e/{hook_id} + +MARKETPLACE_ENABLED=true +MARKETPLACE_API_URL=https://marketplace.dify.ai + +FORCE_VERIFYING_SIGNATURE=true diff --git a/apps/dify/0.15.3/envs/global.env b/apps/dify/1.0.0/envs/global.env similarity index 100% rename from apps/dify/0.15.3/envs/global.env rename to apps/dify/1.0.0/envs/global.env diff --git a/apps/dify/0.15.3/scripts/init.sh b/apps/dify/1.0.0/scripts/init.sh similarity index 100% rename from apps/dify/0.15.3/scripts/init.sh rename to apps/dify/1.0.0/scripts/init.sh diff --git a/apps/dify/0.15.3/scripts/uninstall.sh b/apps/dify/1.0.0/scripts/uninstall.sh similarity index 100% rename from apps/dify/0.15.3/scripts/uninstall.sh rename to apps/dify/1.0.0/scripts/uninstall.sh diff --git a/apps/dify/0.15.3/scripts/upgrade.sh b/apps/dify/1.0.0/scripts/upgrade.sh similarity index 100% rename from apps/dify/0.15.3/scripts/upgrade.sh rename to apps/dify/1.0.0/scripts/upgrade.sh