Gros refactoring
This commit is contained in:
parent
6008aa68f6
commit
4a6bfc951f
368 changed files with 22503 additions and 3 deletions
52
backend/Dockerfile
Normal file
52
backend/Dockerfile
Normal file
|
@ -0,0 +1,52 @@
|
|||
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/*
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||
|
||||
# Add Poetry to PATH
|
||||
ENV PATH="/root/.local/bin:$PATH"
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only pyproject.toml and poetry.lock (if it exists)
|
||||
COPY pyproject.toml poetry.lock* ./
|
||||
|
||||
# Install project dependencies
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install --no-interaction --no-ansi
|
||||
|
||||
# Policy for ImageMagick
|
||||
COPY conf/policy.xml /etc/ImageMagick-6/policy.xml
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 8000
|
||||
|
||||
# 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 ["poetry", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
Loading…
Add table
Add a link
Reference in a new issue