diff --git a/.github/workflows/platform-frontend-ci.yml b/.github/workflows/platform-frontend-ci.yml index 4bf8a2b80c..fc247fd0c1 100644 --- a/.github/workflows/platform-frontend-ci.yml +++ b/.github/workflows/platform-frontend-ci.yml @@ -6,10 +6,12 @@ on: paths: - ".github/workflows/platform-frontend-ci.yml" - "autogpt_platform/frontend/**" + - "autogpt_platform/backend/Dockerfile" pull_request: paths: - ".github/workflows/platform-frontend-ci.yml" - "autogpt_platform/frontend/**" + - "autogpt_platform/backend/Dockerfile" merge_group: workflow_dispatch: diff --git a/autogpt_platform/backend/Dockerfile b/autogpt_platform/backend/Dockerfile index 05a8d4858b..6037ed656f 100644 --- a/autogpt_platform/backend/Dockerfile +++ b/autogpt_platform/backend/Dockerfile @@ -59,12 +59,7 @@ FROM debian:13-slim AS server WORKDIR /app -ENV POETRY_HOME=/opt/poetry \ - POETRY_NO_INTERACTION=1 \ - POETRY_VIRTUALENVS_CREATE=true \ - POETRY_VIRTUALENVS_IN_PROJECT=true \ - DEBIAN_FRONTEND=noninteractive -ENV PATH=/opt/poetry/bin:$PATH +ENV DEBIAN_FRONTEND=noninteractive # Install Python, FFmpeg, ImageMagick, and CLI tools for agent use. # bubblewrap provides OS-level sandbox (whitelist-only FS + no network) @@ -81,6 +76,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ bubblewrap \ && rm -rf /var/lib/apt/lists/* +# Copy poetry (build-time only, for `poetry install --only-root` to create entry points) COPY --from=builder /usr/local/lib/python3* /usr/local/lib/python3* COPY --from=builder /usr/local/bin/poetry /usr/local/bin/poetry # Copy Node.js installation for Prisma @@ -104,11 +100,12 @@ COPY autogpt_platform/backend/poetry.lock autogpt_platform/backend/pyproject.tom # Copy backend code + docs (for Copilot docs search) COPY autogpt_platform/backend ./ COPY docs /app/docs -RUN poetry install --no-ansi --only-root +RUN POETRY_VIRTUALENVS_CREATE=true POETRY_VIRTUALENVS_IN_PROJECT=true \ + poetry install --no-ansi --only-root ENV PORT=8000 -CMD ["poetry", "run", "rest"] +CMD ["rest"] # =============================== DB MIGRATOR =============================== #