Merge branch 'dev'
CI/CD / deploy (push) Has been cancelled
Details
CI/CD / deploy (push) Has been cancelled
Details
This commit is contained in:
commit
8cd0187036
18
Dockerfile
18
Dockerfile
|
|
@ -26,27 +26,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl xz-utils c
|
|||
&& rm -rf /tmp/typst* \
|
||||
&& chmod +x /usr/local/bin/typst
|
||||
|
||||
# MarkItDown venv stage — Python + pip install markitdown
|
||||
FROM debian:bookworm-slim AS markitdown
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-venv \
|
||||
&& python3 -m venv /opt/markitdown \
|
||||
&& /opt/markitdown/bin/pip install --no-cache-dir markitdown \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Production stage
|
||||
FROM oven/bun:1-slim AS production
|
||||
WORKDIR /app
|
||||
|
||||
# Install CA certificates + python3 runtime (for markitdown)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates python3 && rm -rf /var/lib/apt/lists/*
|
||||
# Install CA certificates + python3 + pip (for markitdown)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates python3 python3-pip \
|
||||
&& pip install --no-cache-dir --break-system-packages markitdown \
|
||||
&& apt-get purge -y python3-pip && apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Typst binary (for rPubs PDF generation)
|
||||
COPY --from=typst /usr/local/bin/typst /usr/local/bin/typst
|
||||
|
||||
# Install MarkItDown venv (for office document conversion)
|
||||
COPY --from=markitdown /opt/markitdown /opt/markitdown
|
||||
ENV PATH="/opt/markitdown/bin:$PATH"
|
||||
|
||||
# Copy built assets and server
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/server ./server
|
||||
|
|
|
|||
Loading…
Reference in New Issue