This commit is contained in:
Gary Kwok
2024-01-24 17:21:54 +08:00
commit 6ddd2f22e3
4 changed files with 48 additions and 0 deletions

7
Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM python:3.10
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./app /code/app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]

9
app/main.py Normal file
View File

@@ -0,0 +1,9 @@
from typing import Union
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}

32
requirements.txt Normal file
View File

@@ -0,0 +1,32 @@
annotated-types==0.6.0
anyio==4.2.0
certifi==2023.11.17
click==8.1.7
dnspython==2.4.2
email-validator==2.1.0.post1
exceptiongroup==1.2.0
fastapi==0.109.0
h11==0.14.0
httpcore==1.0.2
httptools==0.6.1
httpx==0.26.0
idna==3.6
itsdangerous==2.1.2
Jinja2==3.1.3
MarkupSafe==2.1.3
orjson==3.9.10
pydantic==2.5.3
pydantic-extra-types==2.4.1
pydantic-settings==2.1.0
pydantic_core==2.14.6
python-dotenv==1.0.0
python-multipart==0.0.6
PyYAML==6.0.1
sniffio==1.3.0
starlette==0.35.1
typing_extensions==4.9.0
ujson==5.9.0
uvicorn==0.25.0
uvloop==0.19.0
watchfiles==0.21.0
websockets==12.0

0
venv/Readme Normal file
View File