First commit
This commit is contained in:
33
worker/Dockerfile
Normal file
33
worker/Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Installation des dépendances système et Tesseract OCR
|
||||
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 .
|
||||
COPY ./app/entrypoint.sh /entrypoint.sh
|
||||
COPY ./app/priority_entrypoint.sh /priority_entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh /priority_entrypoint.sh
|
||||
|
||||
# Variables d'environnement
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV TESSERACT_DATA_PATH=/usr/share/tesseract-ocr/4.00/tessdata
|
||||
|
||||
# Commande d'exécution
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["python", "worker.py", "--queues", "cheque_processing"]
|
||||
Reference in New Issue
Block a user