Skip to content

Commit

Permalink
Try using a requirements.txt #3
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvdavies committed Sep 19, 2024
1 parent b8e13eb commit ad3fdad
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ 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
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
40 changes: 40 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ad3fdad

Please sign in to comment.