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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor: Promote basepath to environment variable (#24445)
17hz0fb145e667e0
diff --git a/web/.env.example b/web/.env.exampleindex 37bfc939ebe..23b72b3414c 100644--- a/web/.env.example+++ b/web/.env.example@@ -2,6 +2,8 @@NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT# The deployment edition, SELF_HOSTEDNEXT_PUBLIC_EDITION=SELF_HOSTED+# The base path for the application+NEXT_PUBLIC_BASE_PATH=# The base URL of console application, refers to the Console base URL of WEB service if console domain is# different from api or web app domain.# example: http://cloud.dify.ai/console/apidiff --git a/web/Dockerfile b/web/Dockerfileindex 2ea8402cd66..317a7f9c5b0 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -12,6 +12,7 @@ RUN apk add --no-cache tzdataRUN corepack enableENV PNPM_HOME="/pnpm"ENV PATH="$PNPM_HOME:$PATH"+ENV NEXT_PUBLIC_BASE_PATH=# install packagesdiff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.shindex ef13011a71e..c12ebc08125 100755--- a/web/docker/entrypoint.sh+++ b/web/docker/entrypoint.sh@@ -14,6 +14,7 @@ set -eexport NEXT_PUBLIC_DEPLOY_ENV=${DEPLOY_ENV}export NEXT_PUBLIC_EDITION=${EDITION}+export NEXT_PUBLIC_BASE_PATH=${NEXT_PUBLIC_BASE_PATH}export NEXT_PUBLIC_API_PREFIX=${CONSOLE_API_URL}/console/apiexport NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/apiexport NEXT_PUBLIC_MARKETPLACE_API_PREFIX=${MARKETPLACE_API_URL}/api/v1diff --git a/web/utils/var-basePath.js b/web/utils/var-basePath.jsindex 07b7f7581b3..ff6dd505ea5 100644--- a/web/utils/var-basePath.js+++ b/web/utils/var-basePath.js@@ -1,6 +1,6 @@// export basePath to next.config.js// same as the one exported from var.tsmodule.exports = {- basePath: '',+ basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',assetPrefix: '',}