fabriquedoc/backend/Dockerfile

45 lines
958 B
Text
Raw Normal View History

2024-12-31 22:00:07 +00:00
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 .
2024-12-31 22:00:07 +00:00
# Installer les dépendances
RUN pip install -r requirements.txt
2024-12-31 22:00:07 +00:00
# Policy for ImageMagick
COPY conf/policy.xml /etc/ImageMagick-6/policy.xml
# Expose the application port
2025-01-01 02:01:12 +00:00
EXPOSE 8080
2024-12-31 22:00:07 +00:00
# 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"]