2024-01-28 18:21:49 +00:00
|
|
|
FROM python:3.11-slim
|
2022-12-28 05:04:27 +00:00
|
|
|
|
|
|
|
# Install system dependencies
|
2024-01-28 18:21:49 +00:00
|
|
|
RUN apt-get -y update
|
2022-12-28 05:04:27 +00:00
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
pandoc\
|
|
|
|
imagemagick \
|
|
|
|
lmodern
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
texlive-latex-recommended \
|
2023-07-04 19:06:54 +00:00
|
|
|
texlive-fonts-recommended
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
2022-12-28 05:04:27 +00:00
|
|
|
texlive-lang-french \
|
|
|
|
texlive-luatex
|
|
|
|
|
2023-07-04 19:06:54 +00:00
|
|
|
RUN apt-get install -y \
|
|
|
|
texlive-latex-extra \
|
|
|
|
texlive-fonts-extra
|
|
|
|
|
2022-12-28 05:04:27 +00:00
|
|
|
# Set the working directory
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy the requirements file
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
|
|
|
# Install Python dependencies
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
# Policy for ImageMagick
|
|
|
|
COPY conf/policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
|
|
|
|
|
# Expose the application port
|
|
|
|
EXPOSE 8000
|
|
|
|
|
2023-07-05 05:12:44 +00:00
|
|
|
# Copy the application code
|
2023-07-05 18:00:57 +00:00
|
|
|
COPY conf ./conf
|
|
|
|
COPY font ./font
|
|
|
|
COPY resources ./resources
|
|
|
|
COPY styles ./styles
|
2024-11-11 04:28:47 +00:00
|
|
|
COPY routers ./routers
|
2023-07-05 18:00:57 +00:00
|
|
|
COPY *.py .
|
|
|
|
COPY *.lua .
|
2023-07-05 05:12:44 +00:00
|
|
|
|
2022-12-28 05:04:27 +00:00
|
|
|
# Run the application
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|