Compare commits

..

5 Commits

Author SHA1 Message Date
392bac1a89 fix(docker): remove redundant dify-agent/src copy from production stage 2026-05-27 22:45:41 -07:00
1d8f0448f3 Merge branch 'fix/dify-agent-editable-docker' into deploy/enterprise 2026-05-27 22:45:21 -07:00
1f8f193d05 fix(docker): use --no-editable in production image build
#36735 switched dify-agent to an editable install, which writes a .pth
file pointing to /app/dify-agent/src. The production stage copied the
venv but not the source, making the path dead at runtime and causing
ModuleNotFoundError: No module named 'agenton'.

--no-editable installs all editable deps as regular wheel installs,
copying packages into site-packages. No source directory needed at
runtime. Local dev is unaffected — editable behavior is preserved when
running uv sync without this flag.
2026-05-27 22:45:03 -07:00
0ab33e2e84 fix(docker): copy only dify-agent/src to avoid exposing dev files 2026-05-27 22:38:14 -07:00
59eccd0336 fix(docker): copy dify-agent source into production stage
Commit 332d1ea switched dify-agent to an editable install, which writes
a .pth file pointing to /app/dify-agent/src at build time. The production
stage copied the venv but not the source directory, causing a
ModuleNotFoundError for `agenton` at runtime.
2026-05-27 22:16:59 -07:00
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
name: Deploy SaaS
name: Deploy Agent Dev
permissions:
contents: read
@ -7,7 +7,7 @@ on:
workflow_run:
workflows: ["Build and Push API & Web"]
branches:
- "deploy/saas"
- "deploy/agent-dev"
types:
- completed
@ -16,7 +16,7 @@ jobs:
runs-on: depot-ubuntu-24.04
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'deploy/saas'
github.event.workflow_run.head_branch == 'deploy/agent-dev'
steps:
- name: Deploy to server
uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5

View File

@ -27,7 +27,7 @@ COPY api/providers ./providers
COPY dify-agent/pyproject.toml dify-agent/README.md /app/dify-agent/
COPY dify-agent/src /app/dify-agent/src
# Trust the checked-in lock during image builds; local path sources are copied from the repository context.
RUN uv sync --frozen --no-dev
RUN uv sync --frozen --no-dev --no-editable
# production stage
FROM base AS production