fabriquedoc/backend/Dockerfile
2025-01-08 14:14:51 -05:00

45 lines
No EOL
958 B
Docker

FROM python:3.13-slim
# Install system dependencies
RUN apt-get -y update && apt-get install -y \
pandoc \
imagemagick \
lmodern \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-lang-french \
texlive-luatex \
texlive-latex-extra \
texlive-fonts-extra \
curl \
build-essential \
gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copier les fichiers de configuration de Poetry
COPY requirements.txt .
# Installer les dépendances
RUN pip install -r requirements.txt
# Policy for ImageMagick
COPY conf/policy.xml /etc/ImageMagick-6/policy.xml
# Expose the application port
EXPOSE 8080
# Copy the application code
COPY conf ./conf
COPY font ./font
COPY resources ./resources
COPY styles ./styles
COPY routers ./routers
COPY *.py .
COPY *.lua .
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]