-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 720 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.11-slim
RUN apt update \
&& apt install --no-install-recommends -y \
ghostscript \
tesseract-ocr-all \
&& rm -rf /var/lib/apt/lists/*
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata
WORKDIR /app
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
RUN useradd app && \
chown -R app:app /app
USER app
COPY ./app /app/app
COPY ./main.py /app/main.py
COPY ./cli.py /app/cli.py
COPY ./alembic.ini /app/alembic.ini
COPY ./migrations/ /app/migrations
COPY ./static/ /app/static
COPY ./SKILL.md /app/SKILL.md
CMD ["fastapi", "run", "main.py", "--port", "80", "--host", "0.0.0.0", "--workers", "4", "--proxy-headers"]