diff --git a/dockerfile b/dockerfile index dac624c..18cee45 100644 --- a/dockerfile +++ b/dockerfile @@ -1,24 +1,14 @@ FROM ubuntu:latest +COPY api.py requirements.txt ./ RUN apt-get update -y RUN apt-get install -y libgl1-mesa-glx RUN apt-get install -y tesseract-ocr-pol RUN apt-get install -y python3-pip -RUN pip3 install opencv-python -RUN pip3 install pytesseract -RUN pip3 install PyMuPDF -RUN pip3 install fastapi -RUN pip3 install python-multipart -RUN pip3 install uvicorn -# Expose the port 8000 in which our application runs -EXPOSE 8000 -# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane) -WORKDIR /app - -COPY main.py . - -CMD ["uvicorn", "--host", "0.0.0.0", "--port", "8000", "main:app"] +EXPOSE 80:8000/tcp +RUN pip install -r requirements.txt +CMD python api.py diff --git a/heroku.yml b/heroku.yml deleted file mode 100644 index 17ed739..0000000 --- a/heroku.yml +++ /dev/null @@ -1,3 +0,0 @@ -build: - docker: - web: dockerfile \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..63f857a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +opencv-python +pytesseract +uvicorn +tika +fastapi +requests +python-multipart +PyMuPDF \ No newline at end of file