Files
officeconvert/Dockerfile.server
T
end 60cf8c231c
Docker server image / build-and-push (push) Failing after 1m18s
fix dockerfile, add build CI, deploy example
2026-03-27 15:19:30 -07:00

35 lines
901 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Protobuf/gRPC stubs live outside the venv-installed packages
ENV PYTHONPATH=/app/gen/python
# libreoffice: soffice (headless PPTX→PDF); poppler-utils: pdftoppm; fonts-dejavu-core: baseline fonts
RUN apt-get update && apt-get install -y --no-install-recommends \
libreoffice \
libreoffice-impress \
poppler-utils \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Hatch (pyproject readme = ../../../README.md) resolves from each package dir; repo root must exist
COPY README.md /app/README.md
COPY python /app/python
COPY gen /app/gen
RUN pip install --no-cache-dir uv
WORKDIR /app/python
RUN uv sync --frozen --all-packages
ENV PATH="/app/python/.venv/bin:$PATH"
WORKDIR /app
EXPOSE 8080
CMD ["uvicorn", "officeconvert_server.app:app", "--host", "0.0.0.0", "--port", "8080"]