mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
fix(engine): match Dockerfile layout to root Taskfile dir: engine
This commit is contained in:
+27
-4
@@ -10,17 +10,40 @@ RUN apt-get update \
|
|||||||
&& rm /tmp/task.deb \
|
&& rm /tmp/task.deb \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
# The OSS repo's root Taskfile.yml expects engine tasks to run from ./engine/
|
||||||
|
# (configured via `includes.engine.dir: engine`). The OSS-clone-build workflow
|
||||||
|
# copies the root Taskfile.yml + .taskfiles/ into the engine build context, then
|
||||||
|
# this Dockerfile copies them into the image. To match the Taskfile's expectations
|
||||||
|
# at runtime, engine source must live at /app/engine/ — not flattened to /app/ —
|
||||||
|
# so `task engine:run` can chdir there successfully and uv resolves
|
||||||
|
# scripts/setup_env.py to /app/engine/scripts/setup_env.py.
|
||||||
|
#
|
||||||
|
# Layout:
|
||||||
|
# /app/Taskfile.yml ← workflow-copied root Taskfile
|
||||||
|
# /app/.taskfiles/ ← workflow-copied .taskfiles
|
||||||
|
# /app/engine/pyproject.toml
|
||||||
|
# /app/engine/uv.lock
|
||||||
|
# /app/engine/.env
|
||||||
|
# /app/engine/scripts/ ← scripts/setup_env.py here
|
||||||
|
# /app/engine/src/ ← uvicorn entrypoint dir
|
||||||
|
# /app/engine/.venv/ ← uv-managed venv
|
||||||
|
WORKDIR /app/engine
|
||||||
|
|
||||||
COPY pyproject.toml uv.lock Taskfile.yml .env ./
|
COPY pyproject.toml uv.lock .env ./
|
||||||
COPY .taskfiles/ ./.taskfiles/
|
|
||||||
COPY scripts/ ./scripts/
|
COPY scripts/ ./scripts/
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
uv sync --frozen --no-dev
|
uv sync --frozen --no-dev
|
||||||
|
|
||||||
COPY src/ ./src/
|
COPY src/ ./src/
|
||||||
|
|
||||||
ENV PATH="/app/.venv/bin:$PATH"
|
# Task definitions live at /app/ — root Taskfile + included .taskfiles — because
|
||||||
|
# the root Taskfile's `includes.engine.dir: engine` is resolved relative to the
|
||||||
|
# Taskfile's own location, so it must sit one level above engine/.
|
||||||
|
WORKDIR /app
|
||||||
|
COPY Taskfile.yml ./
|
||||||
|
COPY .taskfiles/ ./.taskfiles/
|
||||||
|
|
||||||
|
ENV PATH="/app/engine/.venv/bin:$PATH"
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
EXPOSE 5001
|
EXPOSE 5001
|
||||||
|
|||||||
Reference in New Issue
Block a user