diff --git a/Dockerfile b/Dockerfile index 70e30e5..089e929 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,8 @@ FROM python:3.11-slim-bullseye AS builder WORKDIR /inscriptis -COPY requirements.txt . RUN python -m venv .venv && .venv/bin/python -m pip install --upgrade pip -RUN .venv/bin/pip install --no-cache-dir -r requirements.txt && \ - .venv/bin/pip install --no-cache-dir Flask waitress && \ +RUN .venv/bin/pip install --no-cache-dir inscriptis[web-service] && \ find /inscriptis/.venv \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \+ # @@ -18,10 +16,9 @@ LABEL maintainer="albert@weichselbraun.net" # Note: only copy the src directory, to prevent bloating the image with # irrelevant files from the project directory. -WORKDIR /inscriptis/src +WORKDIR /inscriptis COPY --from=builder /inscriptis /inscriptis -COPY ./src /inscriptis/src ENV PATH="/inscriptis/.venv/bin:$PATH" -CMD ["waitress-serve", "inscriptis.service.web:app", "--port=5000", "--host=0.0.0.0"] +CMD ["uvicorn", "inscriptis.service.web:app", "--port=5000", "--host=0.0.0.0"] EXPOSE 5000