From 1a0ddd5dc889fb85ebf44a66a549a0e404136a8d Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Tue, 17 Nov 2026 20:40:36 +0800 Subject: [PATCH] build(web): stop building vinext in the Docker image The image built both the Next.js and the vinext Node servers and picked one at start with EXPERIMENTAL_ENABLE_VINEXT. Drop the vinext build, its standalone copy, and the toggle, so the image always runs the Next.js server and builds faster. Setting EXPERIMENTAL_ENABLE_VINEXT=true no longer has an effect. The vinext Node build stays available for local use and the bundle-size workflow. --- docker/envs/core-services/web.defaults | 1 - web/Dockerfile | 4 +--- web/docker/entrypoint.sh | 4 ---- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/docker/envs/core-services/web.defaults b/docker/envs/core-services/web.defaults index a1badb003696b5..898609b7bd7efd 100644 --- a/docker/envs/core-services/web.defaults +++ b/docker/envs/core-services/web.defaults @@ -15,7 +15,6 @@ SERVER_CONSOLE_API_URL=${SERVER_CONSOLE_API_URL:-http://api:5001} # WEBAPP_ACCESS_PREFLIGHT_PROXY_SECRET= WEB_SENTRY_DSN=${WEB_SENTRY_DSN:-} NEXT_PUBLIC_SOCKET_URL=${NEXT_PUBLIC_SOCKET_URL:-ws://localhost} -EXPERIMENTAL_ENABLE_VINEXT=${EXPERIMENTAL_ENABLE_VINEXT:-false} LOOP_NODE_MAX_COUNT=${LOOP_NODE_MAX_COUNT:-100} MAX_TOOLS_NUM=${MAX_TOOLS_NUM:-10} MAX_PARALLEL_LIMIT=${MAX_PARALLEL_LIMIT:-10} diff --git a/web/Dockerfile b/web/Dockerfile index aa6b012ab4af0c..f724dc5e6f42a8 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -44,7 +44,7 @@ COPY . . WORKDIR /app/web ENV NODE_OPTIONS="--max-old-space-size=4096" ENV pnpm_config_verify_deps_before_run=false -RUN pnpm build && pnpm build:vinext +RUN pnpm build # production stage @@ -60,7 +60,6 @@ ENV PORT=3000 # Next.js standalone binds to HOSTNAME. Docker defaults it to the container ID, and # net.Server.listen() takes an ID like 30889528e495 as a numeric backlog, not a host. ENV HOSTNAME=0.0.0.0 -ENV EXPERIMENTAL_ENABLE_VINEXT=false ENV NEXT_TELEMETRY_DISABLED=1 # set timezone @@ -81,7 +80,6 @@ WORKDIR /app COPY --from=builder --chown=dify:dify /app/web/public ./targets/next/web/public COPY --from=builder --chown=dify:dify /app/web/.next/standalone ./targets/next/ COPY --from=builder --chown=dify:dify /app/web/.next/static ./targets/next/web/.next/static -COPY --from=builder --chown=dify:dify /app/web/dist/standalone ./targets/vinext COPY --chown=dify:dify --chmod=755 web/docker/entrypoint.sh ./entrypoint.sh diff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.sh index a7a53be7a0f155..3ad03f343fc1c6 100755 --- a/web/docker/entrypoint.sh +++ b/web/docker/entrypoint.sh @@ -55,8 +55,4 @@ export NEXT_PUBLIC_MAX_PARALLEL_LIMIT=${MAX_PARALLEL_LIMIT} export NEXT_PUBLIC_MAX_ITERATIONS_NUM=${MAX_ITERATIONS_NUM} export NEXT_PUBLIC_MAX_TREE_DEPTH=${MAX_TREE_DEPTH} -if [ "${EXPERIMENTAL_ENABLE_VINEXT:-}" = "true" ]; then - exec node /app/targets/vinext/server.js -fi - exec node /app/targets/next/web/server.js