From 1cdae16b2858bffdb0ef74cdd26e8dfeaaf8cb75 Mon Sep 17 00:00:00 2001 From: Byron Wang Date: Sun, 1 Mar 2026 15:11:14 +0800 Subject: [PATCH] update web and api dockerfile --- api/Dockerfile | 2 +- web/Dockerfile | 9 +-------- web/docker/entrypoint.sh | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 3a54082d97..eb47e2307e 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -86,7 +86,7 @@ COPY --chown=dify:dify . /app/api # Prepare entrypoint script COPY --chown=dify:dify --chmod=755 docker/entrypoint.sh /entrypoint.sh -RUN uv sync --frozen --no-dev && pip3 install --no-cache-dir --upgrade "wheel==0.46.3" "jaraco.context==6.1.0" "setuptools==80.10.2" +RUN uv sync --frozen --no-dev && pip3 install --no-cache-dir --upgrade "wheel==0.46.3" "jaraco.context==6.1.0" "setuptools==80.10.2" && uv cache clean && rm -rf /root/.cache/pip # Download nltk data RUN mkdir -p /usr/local/share/nltk_data \ diff --git a/web/Dockerfile b/web/Dockerfile index 37c9aeb833..b81c2648f8 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -57,18 +57,11 @@ ENV TZ=UTC RUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime \ && echo ${TZ} > /etc/timezone -# global runtime packages -RUN pnpm add -g pm2 - - # Create non-root user ARG dify_uid=1001 RUN addgroup -S -g ${dify_uid} dify && \ adduser -S -u ${dify_uid} -G dify -s /bin/ash -h /home/dify dify && \ - mkdir -p /app && \ - mkdir -p /.pm2 && \ - chown -R dify:dify /app /.pm2 - + mkdir -p /app WORKDIR /app/web diff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.sh index 7e1aca680b..034ed96491 100755 --- a/web/docker/entrypoint.sh +++ b/web/docker/entrypoint.sh @@ -43,4 +43,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} -pm2 start /app/web/server.js --name dify-web --cwd /app/web -i ${PM2_INSTANCES} --no-daemon +exec node /app/web/server.js