22 lines
755 B
Docker
22 lines
755 B
Docker
# Hinterstein Mieterportal – OCR-Dienst (Tesseract Deutsch)
|
||
# Analysiert Belege (PDF/Bild) für die Auto-Zuordnung (Zählernummer/Adresse).
|
||
# Nur intern im Docker-Netz (mp-api → mp-ocr:8081), kein öffentlicher Port.
|
||
|
||
FROM python:3.12-slim
|
||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
tesseract-ocr tesseract-ocr-deu \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
WORKDIR /app
|
||
COPY requirements.txt ./
|
||
RUN pip install --no-cache-dir -r requirements.txt
|
||
COPY main.py ./
|
||
|
||
ENV PORT=8081
|
||
EXPOSE 8081
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s \
|
||
CMD python -c "import urllib.request;urllib.request.urlopen('http://localhost:8081/healthz')" || exit 1
|
||
|
||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8081"]
|