diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a8cc85d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,20 @@ +# Git +.git +.gitignore + +# Docker +Dockerfile +docker-compose.yml +.dockerignore + +# Python +__pycache__/ +*.pyc +*.pyo +*.pyd +venv/ +*.egg-info/ + +# IDE files +.vscode/ +.idea/ \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile index cc2afd8..472fb5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ # Dockerfile FROM python:3.13.7-slim +ENV PYTHONUNBUFFERED=1 \ + DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ tesseract-ocr \ + tesseract-ocr-eng \ + tesseract-ocr-deu \ ghostscript \ poppler-utils \ libreoffice \ @@ -14,6 +18,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libheif-examples \ inkscape \ calibre \ + pngquant \ + libvips-tools \ build-essential \ pkg-config \ git \ diff --git a/docker-compose.yml b/docker-compose.yml index 28f5839..d8adb5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,17 @@ version: "3.9" services: + # The FastAPI Web Server web: build: . + env_file: + - .env ports: - - "5000:5000" + - "8000:8000" volumes: - - .:/app # optional: mount code for live changes - environment: - - FLASK_ENV=development + # Mount local directories and files into the container for persistence + - ./uploads:/app/uploads + - ./processed:/app/processed + - ./settings.yml:/app/settings.yml + - ./jobs.db:/app/jobs.db + - ./huey.db:/app/huey.db +