diff --git a/.build/Dockerfile b/.build/Dockerfile new file mode 100644 index 0000000..d0902e2 --- /dev/null +++ b/.build/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.9.16-slim-bullseye + +# Set build shell to bash, default has has some issues sometimes +SHELL ["/bin/bash", "-c"] + +# Install packges +RUN apt update \ + && apt install --no-install-recommends -y imagemagick jq curl tesseract-ocr nano + +WORKDIR /var/www/html +COPY . /var/www/html/ +RUN chmod 777 . + +# del usesless files +RUN rm -rf \ + /var/lib/{apt,dpkg} \ + /var/{cache,log,spool} \ + /var/www/html/{.git,.build,README.md,env.example,docker-compose.yml,.gitignore} +RUN mkdir -p logs + +CMD python3 -m http.server --cgi 8000 --directory public diff --git a/.build/docker-compose.yml b/.build/docker-compose.yml new file mode 100644 index 0000000..cf9974f --- /dev/null +++ b/.build/docker-compose.yml @@ -0,0 +1,7 @@ +services: + reciptocr: + build: + context: .. + dockerfile: .build/Dockerfile + hostname: reciptocr + image: reciptocr