Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: add PIP_MIRROR_URL environment variable support (#15353)

Yeuoly59fd3aad31b4
diff --git a/docker/.env.example b/docker/.env.example
index aff037959f3..d8b8c49ed3a 100644
--- a/docker/.env.example
+++ b/docker/.env.example
@@ -971,3 +971,5 @@ FORCE_VERIFYING_SIGNATURE=true
PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
PLUGIN_MAX_EXECUTION_TIMEOUT=600
+# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
+PIP_MIRROR_URL=
diff --git a/docker/docker-compose-template.yaml b/docker/docker-compose-template.yaml
index df37aedab1b..fb9cae38e5c 100644
--- a/docker/docker-compose-template.yaml
+++ b/docker/docker-compose-template.yaml
@@ -151,6 +151,7 @@ services:
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
+ PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
ports:
- "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
volumes:
diff --git a/docker/docker-compose.middleware.yaml b/docker/docker-compose.middleware.yaml
index 2fcf3d375db..1aa2b090cad 100644
--- a/docker/docker-compose.middleware.yaml
+++ b/docker/docker-compose.middleware.yaml
@@ -90,6 +90,7 @@ services:
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
+ PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
ports:
- "${EXPOSE_PLUGIN_DAEMON_PORT:-5002}:${PLUGIN_DAEMON_PORT:-5002}"
- "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index d0a9c4df639..601fae5e0d2 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -415,6 +415,7 @@ x-shared-env: &shared-api-worker-env
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
PLUGIN_PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
+ PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
services:
# API service
@@ -568,6 +569,7 @@ services:
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
PLUGIN_MAX_EXECUTION_TIMEOUT: ${PLUGIN_MAX_EXECUTION_TIMEOUT:-600}
+ PIP_MIRROR_URL: ${PIP_MIRROR_URL:-}
ports:
- "${EXPOSE_PLUGIN_DEBUGGING_PORT:-5003}:${PLUGIN_DEBUGGING_PORT:-5003}"
volumes:
diff --git a/docker/middleware.env.example b/docker/middleware.env.example
index e0be6a29807..d01f9abe537 100644
--- a/docker/middleware.env.example
+++ b/docker/middleware.env.example
@@ -118,3 +118,5 @@ FORCE_VERIFYING_SIGNATURE=true
PLUGIN_PYTHON_ENV_INIT_TIMEOUT=120
PLUGIN_MAX_EXECUTION_TIMEOUT=600
+# PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
+PIP_MIRROR_URL=
\ No newline at end of file