First commit

This commit is contained in:
2025-07-09 02:12:06 +02:00
parent 1a7946495c
commit a5e044d747
23 changed files with 1967 additions and 0 deletions

34
api/Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
FROM python:3.10-slim
WORKDIR /app
# Installation des dépendances système
RUN apt-get update && apt-get install -y \
gcc \
python3-dev \
tesseract-ocr \
tesseract-ocr-fra \
tesseract-ocr-eng \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copie et installation des dépendances Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copie du code de l'application
COPY ./app /app/app
COPY ./app/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Variables d'environnement
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Exposition du port
EXPOSE 8000
# Commande d'exécution
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]