From 215bd8e991776b5415077e493ee30e4a5c87ae4b Mon Sep 17 00:00:00 2001 From: FelixFehse Date: Wed, 10 Apr 2024 12:02:48 +0200 Subject: [PATCH] IL-421 expose docker port to localhost --- .../Dockerfile | 10 ++++++---- .../requirements.txt | Bin 26825 -> 26824 bytes 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/examples/issue_classification_user_journey/Dockerfile b/src/examples/issue_classification_user_journey/Dockerfile index d265295a7..afd210e8e 100644 --- a/src/examples/issue_classification_user_journey/Dockerfile +++ b/src/examples/issue_classification_user_journey/Dockerfile @@ -9,11 +9,10 @@ COPY requirements.txt /app/requirements.txt RUN python3 -m venv /app/venv ENV PATH="/app/venv/bin:$PATH" -RUN echo $(cat /run/secrets/GITHUB_TOKEN) - RUN pip install --upgrade pip RUN --mount=type=secret,id=GITHUB_TOKEN \ - GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) pip install -r /app/requirements.txt + GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \ + pip install -r /app/requirements.txt FROM ubuntu:latest as runtime @@ -28,4 +27,7 @@ COPY --from=builder /app /app COPY main.py /app/main.py ENV PATH="/app/venv/bin:$PATH" -ENTRYPOINT [ "uvicorn", "app.main:app" ] +ENTRYPOINT [ "uvicorn", "--host", "0.0.0.0", "--port", "80", "app.main:app" ] +# run with +# docker run -p 8000:80 classification-service:local +# you can then access the server on localhost:8000 \ No newline at end of file diff --git a/src/examples/issue_classification_user_journey/requirements.txt b/src/examples/issue_classification_user_journey/requirements.txt index e1fc1667dc2fe82985a554128b16f9f1e6f56e86..e1fa0186a3d96e947261b1c3edc941be52a96b69 100644 GIT binary patch delta 9 QcmX?kk@3Vu#tkPj02+D)761SM delta 11 ScmX?ck@4h3#tkPj7`Xr>uLU6h