From aa62471ae502124413ba9e76573b935414941fd1 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Thu, 19 Sep 2024 10:47:10 +0000 Subject: [PATCH] Try using a requirements.txt #3 --- Dockerfile | 4 ++-- README.md | 1 + pyproject.toml | 9 ++++----- requirements.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index ce29a4c..137a2f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ FROM python:3.12.5-alpine3.20@sha256:bb5d0ac04679d78a1258e7dfacdb4d9bdefe9a10480 WORKDIR /object-storage-api-run -COPY pyproject.toml ./ +COPY requirements.txt ./ COPY object_storage_api/ object_storage_api/ RUN --mount=type=cache,target=/root/.cache \ set -eux; \ \ - python3 -m pip install .; + python3 -m pip install -r requirements.txt; CMD ["fastapi", "dev", "object_storage_api/main.py", "--host", "0.0.0.0", "--port", "8000"] EXPOSE 8000 diff --git a/README.md b/README.md index a960277..165c93a 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ Ensure that Python is installed on your machine before proceeding. ```bash pip install .[dev] + pip install -r requirements.txt ``` 3. Create a `.env` file alongside the `.env.example` file. Use the example file as a reference and modify the values diff --git a/pyproject.toml b/pyproject.toml index 234b6e4..a896f1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,10 @@ requires-python = ">=3.12" version = "0.0.1" dependencies = [ - "cryptography==42.0.8", - "fastapi[all]==0.111.0", - "PyJWT==2.8.0", - "pymongo==4.8.0", - "uvicorn==0.30.1" + "cryptography", + "fastapi[all]", + "PyJWT", + "pymongo", ] [project.urls] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e8a51c9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,40 @@ +annotated-types==0.7.0 +anyio==4.5.0 +certifi==2024.8.30 +click==8.1.7 +dnspython==2.6.1 +email_validator==2.2.0 +fastapi==0.111.0 +fastapi-cli==0.0.5 +h11==0.14.0 +httpcore==1.0.5 +httptools==0.6.1 +httpx==0.27.2 +idna==3.10 +itsdangerous==2.2.0 +Jinja2==3.1.4 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +mdurl==0.1.2 +orjson==3.10.7 +pydantic==2.9.2 +pydantic-extra-types==2.9.0 +pydantic-settings==2.5.2 +pydantic_core==2.23.4 +Pygments==2.18.0 +PyJWT==2.8.0 +pymongo==4.8.0 +python-dotenv==1.0.1 +python-multipart==0.0.9 +PyYAML==6.0.2 +rich==13.8.1 +shellingham==1.5.4 +sniffio==1.3.1 +starlette==0.37.2 +typer==0.12.5 +typing_extensions==4.12.2 +ujson==5.10.0 +uvicorn==0.30.6 +uvloop==0.20.0 +watchfiles==0.24.0 +websockets==13.0.1